Torque::FS::FileSystemChangeNotifier
Classes:
Protected Types
Map< Path, FileInfoList >
DirMap
map a directory to a list of files and their mod times
Protected Attributes
Public Functions
bool
addNotification(const Path & path, ChangeDelegate callback)
Adds a file change notification.
bool
Returns true if the notifier is enabled and file change notifications will be sent.
bool
removeNotification(const Path & path, ChangeDelegate callback)
Removes an existing file change notification.
Protected Functions
bool
internalAddNotification(const Path & dir)
This is called so the inherited class can do its own bookkeeping on addNotification()
internalNotifyDirChanged(const Path & dir)
Called by the inherited class to let us know a directory has changed so we can find the file which changed and notify on it.
bool
internalRemoveNotification(const Path & dir)
This is called so the inherited class can do its own bookkeeping on removeNotification()
Detailed Description
Public Types
typedef Delegate< void(const Path &)> ChangeDelegate
typedef Signal< void(const Path &)> ChangeSignal
Protected Types
typedef Map< Path, FileInfoList > DirMap
map a directory to a list of files and their mod times
typedef List< FileInfo > FileInfoList
Protected Attributes
DirMap mDirMap
FileSystem * mFS
bool mNotifying
Public Functions
FileSystemChangeNotifier(FileSystem * fs)
~FileSystemChangeNotifier()
addNotification(const Path & path, ChangeDelegate callback)
Adds a file change notification.
Reimplemented by: Torque::FileSystemRedirectChangeNotifier
isNotifying()
Returns true if the notifier is enabled and file change notifications will be sent.
removeNotification(const Path & path, ChangeDelegate callback)
Removes an existing file change notification.
Reimplemented by: Torque::FileSystemRedirectChangeNotifier
startNotifier()
stopNotifier()
Protected Functions
cleanPath(const Path & dir)
Makes sure paths going in and out of the notifier will have the same format.
internalAddNotification(const Path & dir)
This is called so the inherited class can do its own bookkeeping on addNotification()
note:We pass the directory here, not the file
Reimplemented by: Torque::FileSystemRedirectChangeNotifier, Torque::Win32::Win32FileSystemChangeNotifier, MacFileSystemChangeNotifier
internalNotifyDirChanged(const Path & dir)
Called by the inherited class to let us know a directory has changed so we can find the file which changed and notify on it.
internalProcessOnce()
Reimplemented by: Torque::FileSystemRedirectChangeNotifier, MacFileSystemChangeNotifier, Torque::Win32::Win32FileSystemChangeNotifier
internalRemoveNotification(const Path & dir)
This is called so the inherited class can do its own bookkeeping on removeNotification()
note:We pass the directory here, not the file
Reimplemented by: Torque::FileSystemRedirectChangeNotifier, Torque::Win32::Win32FileSystemChangeNotifier, MacFileSystemChangeNotifier
process()