aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/DirectorySnapshot.hpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-11-15 17:23:46 +0800
committerLi Jin <dragon-fly@qq.com>2022-11-15 17:52:09 +0800
commit94f8330613877b3582d32bd11abd83a97b4399ad (patch)
tree5359de314be1ebde17f8d1e48632a97d18f9e50f /src/3rdParty/efsw/DirectorySnapshot.hpp
parent60f8f00a022ac08701792b2897b72d8c99b50f52 (diff)
downloadyuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.gz
yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.bz2
yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.zip
adding -w option to Yuescript tool.
Diffstat (limited to 'src/3rdParty/efsw/DirectorySnapshot.hpp')
-rwxr-xr-xsrc/3rdParty/efsw/DirectorySnapshot.hpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/DirectorySnapshot.hpp b/src/3rdParty/efsw/DirectorySnapshot.hpp
new file mode 100755
index 0000000..0e60542
--- /dev/null
+++ b/src/3rdParty/efsw/DirectorySnapshot.hpp
@@ -0,0 +1,45 @@
1#ifndef EFSW_DIRECTORYSNAPSHOT_HPP
2#define EFSW_DIRECTORYSNAPSHOT_HPP
3
4#include <efsw/DirectorySnapshotDiff.hpp>
5
6namespace efsw {
7
8class DirectorySnapshot {
9 public:
10 FileInfo DirectoryInfo;
11 FileInfoMap Files;
12
13 void setDirectoryInfo( std::string directory );
14
15 DirectorySnapshot();
16
17 DirectorySnapshot( std::string directory );
18
19 ~DirectorySnapshot();
20
21 void init( std::string directory );
22
23 bool exists();
24
25 DirectorySnapshotDiff scan();
26
27 FileInfoMap::iterator nodeInFiles( FileInfo& fi );
28
29 void addFile( std::string path );
30
31 void removeFile( std::string path );
32
33 void moveFile( std::string oldPath, std::string newPath );
34
35 void updateFile( std::string path );
36
37 protected:
38 void initFiles();
39
40 void deleteAll( DirectorySnapshotDiff& Diff );
41};
42
43} // namespace efsw
44
45#endif