VPTissue Reference Manual
|
Utility class for being informed about changes to a file/directory on the filesystem. More...
#include <FileSystemWatcher.h>
Public Member Functions | |
FileSystemWatcher (const std::string &path, std::function< void()> callback) | |
FileSystemWatcher (FileSystemWatcher &&other) | |
Move constructor. | |
bool | IsActive () const |
Get 'active' property, i.e. More... | |
void | SetActive (bool a) |
Set 'active' property, i.e. More... | |
Utility class for being informed about changes to a file/directory on the filesystem.
Main purpose is to translate Qt signals to a single callback function, so it can be used by the Workspace/Project template classes. We can't use Qt signals/slots in templates.
Definition at line 36 of file FileSystemWatcher.h.
|
inline |
path | Filesystem path to watch. |
callback | Callback function to call whenever something changes at the given path. |
Definition at line 44 of file FileSystemWatcher.h.
References SetActive().
|
inline |
Get 'active' property, i.e.
whether the callback function is called when something changes at the path. Default for this property is true.
Definition at line 72 of file FileSystemWatcher.h.
|
inline |
Set 'active' property, i.e.
whether the callback function is called when something changes at the path. Default for this property is true.
Definition at line 82 of file FileSystemWatcher.h.
Referenced by FileSystemWatcher().