diff options
Diffstat (limited to 'src/3rdParty/efsw/FileInfo.hpp')
-rwxr-xr-x | src/3rdParty/efsw/FileInfo.hpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/FileInfo.hpp b/src/3rdParty/efsw/FileInfo.hpp new file mode 100755 index 0000000..a8dd3d3 --- /dev/null +++ b/src/3rdParty/efsw/FileInfo.hpp | |||
@@ -0,0 +1,64 @@ | |||
1 | #ifndef EFSW_FILEINFO_HPP | ||
2 | #define EFSW_FILEINFO_HPP | ||
3 | |||
4 | #include <efsw/base.hpp> | ||
5 | #include <list> | ||
6 | #include <map> | ||
7 | #include <string> | ||
8 | |||
9 | namespace efsw { | ||
10 | |||
11 | class FileInfo { | ||
12 | public: | ||
13 | static bool exists( const std::string& filePath ); | ||
14 | |||
15 | static bool isLink( const std::string& filePath ); | ||
16 | |||
17 | static bool inodeSupported(); | ||
18 | |||
19 | FileInfo(); | ||
20 | |||
21 | FileInfo( const std::string& filepath ); | ||
22 | |||
23 | FileInfo( const std::string& filepath, bool linkInfo ); | ||
24 | |||
25 | bool operator==( const FileInfo& Other ) const; | ||
26 | |||
27 | bool operator!=( const FileInfo& Other ) const; | ||
28 | |||
29 | FileInfo& operator=( const FileInfo& Other ); | ||
30 | |||
31 | bool isDirectory() const; | ||
32 | |||
33 | bool isRegularFile() const; | ||
34 | |||
35 | bool isReadable() const; | ||
36 | |||
37 | bool sameInode( const FileInfo& Other ) const; | ||
38 | |||
39 | bool isLink() const; | ||
40 | |||
41 | std::string linksTo(); | ||
42 | |||
43 | bool exists(); | ||
44 | |||
45 | void getInfo(); | ||
46 | |||
47 | void getRealInfo(); | ||
48 | |||
49 | std::string Filepath; | ||
50 | Uint64 ModificationTime; | ||
51 | Uint64 Size; | ||
52 | Uint32 OwnerId; | ||
53 | Uint32 GroupId; | ||
54 | Uint32 Permissions; | ||
55 | Uint64 Inode; | ||
56 | }; | ||
57 | |||
58 | typedef std::map<std::string, FileInfo> FileInfoMap; | ||
59 | typedef std::list<FileInfo> FileInfoList; | ||
60 | typedef std::list<std::pair<std::string, FileInfo>> MovedList; | ||
61 | |||
62 | } // namespace efsw | ||
63 | |||
64 | #endif | ||