aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/DirectorySnapshot.hpp
blob: 0e6054293cd96acfc916751528be07ed2668c918 (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
#ifndef EFSW_DIRECTORYSNAPSHOT_HPP
#define EFSW_DIRECTORYSNAPSHOT_HPP

#include <efsw/DirectorySnapshotDiff.hpp>

namespace efsw {

class DirectorySnapshot {
  public:
	FileInfo DirectoryInfo;
	FileInfoMap Files;

	void setDirectoryInfo( std::string directory );

	DirectorySnapshot();

	DirectorySnapshot( std::string directory );

	~DirectorySnapshot();

	void init( std::string directory );

	bool exists();

	DirectorySnapshotDiff scan();

	FileInfoMap::iterator nodeInFiles( FileInfo& fi );

	void addFile( std::string path );

	void removeFile( std::string path );

	void moveFile( std::string oldPath, std::string newPath );

	void updateFile( std::string path );

  protected:
	void initFiles();

	void deleteAll( DirectorySnapshotDiff& Diff );
};

} // namespace efsw

#endif