class mrpt::system::CFileSystemWatcher¶
This class subscribes to notifications of file system changes, thus it can be used to efficiently stay informed about changes in a directory tree.
Windows: Requires Windows 2000 or newer.
Linux: Requires kernel 2.6.13 or newer. Using this class in an old Linux or other unsoported system (Unix,etc…) has no effect, i.e. no notification will be ever received.
See also:
#include <mrpt/system/CFileSystemWatcher.h> class CFileSystemWatcher { public: // typedefs typedef std::deque<TFileSystemChange> TFileSystemChangeList; // structs struct TFileSystemChange; // construction CFileSystemWatcher(const std::string& path); // methods void getChanges(TFileSystemChangeList& out_list); };
Construction¶
CFileSystemWatcher(const std::string& path)
Creates the subscription to a specified path.
Parameters:
path |
The file or directory to watch. |
Methods¶
void getChanges(TFileSystemChangeList& out_list)
Call this method sometimes to get the list of changes in the watched directory.
See also:
processChange