17class FileSystemWatcher {
21 static FileSystemWatcher *instance() {
return instance_.value; }
22 FileSystemWatcher(
const std::vector<std::string> & = {});
24 bool addPath(
const std::string &path);
25 bool addPaths(
const std::vector<std::string> &paths);
26 bool removePath(
const std::string &path);
27 bool removePaths(
const std::vector<std::string> &paths);
28 std::vector<std::string> paths()
const;
31 FunctionConnectorProtected<FileSystemWatcher>::Connector<
const std::string &,
int>
notify;
36 WatchPath() =
default;
37 WatchPath(
const std::string &);
38 std::string directory;
41 struct Watch :
public WatchPath {
42 using WatchPath::WatchPath;
45 std::vector<Watch *> files_;
46 std::vector<Watch *> wds_;
48 AbstractThread *thread_;
51 std::vector<const Watch *> we_;
52 void append_(
const Watch *);
53 void remove_(
const Watch *);
55 bool operator()(
const Watch *,
const Watch *)
const;
56 bool operator()(
const WatchPath &,
const Watch *)
const;
57 bool operator()(
const Watch *,
const WatchPath &)
const;
59 struct CompareWatchDescriptor {
60 bool operator()(
const Watch *,
const Watch *)
const;
61 bool operator()(
const Watch *,
int)
const;
FunctionConnectorProtected< FileSystemWatcher >::Connector< const std::string &, int > notify
The FunctionConnector for notification of file-related events.
Definition FileSystemWatcher.h:31