class
FolderMonitor
Allows monitoring a file system folder for changes.
Depending on the flags set this monitor can notify you when file is changed/moved/renamed and similar.
Public
Constructors
FolderMonitor
Starts monitoring a folder at the specified path.
- folderPath
- Absolute path to the folder you want to monitor.
- monitorSubdirectories
- If true, provided folder and all of its subdirectories will be monitored for changes. Otherwise only the provided folder will be monitored.
- changeFilter
- A set of flags you may OR together. Different notification events will trigger depending on which flags you set.
Methods
~FolderMonitor
Stops monitor the folder.
Update
Triggers callbacks depending on events that ocurred.
Expected to be called once per frame.
Fields
OnModified
Triggers when a file in the monitored folder is modified.
Provides absolute path to the file.
OnAdded
Triggers when a file/folder is added in the monitored folder.
Provides absolute path to the file/folder.
OnRemoved
Triggers when a file/folder is removed from the monitored folder.
Provides absolute path to the file/folder.
Internal
Methods
GetPrivateDataInternal
Returns private data, for use by internal helper classes and methods.
Private
Methods
WorkerThreadMain
Worker method that monitors the IO ports for any modification notifications.
HandleNotifications
Called by the worker thread whenever a modification notification is received.