blob: f1bcf4bcd8e59b629a20ff34e8197988fcf1ba5c (
plain)
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
|
#ifndef EFSW_FILEINFO_HPP
#define EFSW_FILEINFO_HPP
#include <efsw/base.hpp>
#include <list>
#include <map>
#include <string>
namespace efsw {
class FileInfo {
public:
static bool exists( const std::string& filePath );
static bool isLink( const std::string& filePath );
static bool inodeSupported();
FileInfo();
explicit FileInfo( const std::string& filepath );
FileInfo( const std::string& filepath, bool linkInfo );
FileInfo( const FileInfo& ) = default;
bool operator==( const FileInfo& Other ) const;
bool operator!=( const FileInfo& Other ) const;
FileInfo& operator=( const FileInfo& Other );
bool isDirectory() const;
bool isRegularFile() const;
bool isReadable() const;
bool sameInode( const FileInfo& Other ) const;
bool isLink() const;
std::string linksTo();
bool exists();
void getInfo();
void getRealInfo();
std::string Filepath;
Uint64 ModificationTime;
Uint64 Size;
Uint32 OwnerId;
Uint32 GroupId;
Uint32 Permissions;
Uint64 Inode;
};
typedef std::map<std::string, FileInfo> FileInfoMap;
typedef std::list<FileInfo> FileInfoList;
typedef std::list<std::pair<std::string, FileInfo>> MovedList;
} // namespace efsw
#endif
|