aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/Foundation/include/Poco/File_WIN32U.h
blob: 92beee2ea287ab71dd240654eed409f7f8c2381c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// 
// File_WIN32U.h 
// 
// Library: Foundation 
// Package: Filesystem 
// Module:  File 
// 
// Definition of the Unicode FileImpl class for WIN32. 
// 
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. 
// and Contributors. 
// 
// SPDX-License-Identifier:	BSL-1.0 
// 
 
 
#ifndef Foundation_File_WIN32U_INCLUDED 
#define Foundation_File_WIN32U_INCLUDED 
 
 
#include "Poco/Foundation.h" 
#include "Poco/Timestamp.h" 
 
 
namespace Poco { 
 
 
class Foundation_API FileImpl 
{ 
protected: 
	typedef UInt64 FileSizeImpl; 
 
	FileImpl(); 
	FileImpl(const std::string& path); 
	virtual ~FileImpl(); 
	void swapImpl(FileImpl& file); 
	void setPathImpl(const std::string& path); 
	const std::string& getPathImpl() const; 
	bool existsImpl() const; 
	bool canReadImpl() const; 
	bool canWriteImpl() const; 
	bool canExecuteImpl() const; 
	bool isFileImpl() const; 
	bool isDirectoryImpl() const; 
	bool isLinkImpl() const; 
	bool isDeviceImpl() const; 
	bool isHiddenImpl() const; 
	Timestamp createdImpl() const; 
	Timestamp getLastModifiedImpl() const; 
	void setLastModifiedImpl(const Timestamp& ts); 
	FileSizeImpl getSizeImpl() const; 
	void setSizeImpl(FileSizeImpl size); 
	void setWriteableImpl(bool flag = true); 
	void setExecutableImpl(bool flag = true); 
	void copyToImpl(const std::string& path) const; 
	void renameToImpl(const std::string& path); 
	void linkToImpl(const std::string& path, int type) const; 
	void removeImpl(); 
	bool createFileImpl(); 
	bool createDirectoryImpl(); 
	FileSizeImpl totalSpaceImpl() const; 
	FileSizeImpl usableSpaceImpl() const; 
	FileSizeImpl freeSpaceImpl() const; 
	static void handleLastErrorImpl(const std::string& path); 
	static void convertPath(const std::string& utf8Path, std::wstring& utf16Path); 
 
private: 
	std::string  _path; 
	std::wstring _upath; 
 
	friend class FileHandle; 
	friend class DirectoryIteratorImpl; 
	friend class WindowsDirectoryWatcherStrategy; 
	friend class FileStreamBuf; 
	friend class LogFileImpl; 
}; 
 
 
// 
// inlines 
// 
inline const std::string& FileImpl::getPathImpl() const 
{ 
	return _path; 
} 
 
 
} // namespace Poco 
 
 
#endif // Foundation_File_WIN32U_INCLUDED