![]() |
Lysa
0.0
Lysa 3D Engine
|
Monitors a directory for changes and emits events when files are modified.
This class runs a background thread that uses OS-specific APIs to watch for file changes. A DirectoryWatcherEvent::FILE_CHANGED event is emmitted when a file of the directory is modified.
Public Member Functions | |
| DirectoryWatcher (const std::string &uri, uint32 debounceTimer=100) | |
| ~DirectoryWatcher () | |
| void | start () |
| void | stop () noexcept |
| DirectoryWatcher | ( | const std::string & | uri, |
| uint32 | debounceTimer = 100 |
||
| ) |
Creates a DirectoryWatcher and starts it.
| uri | The URI of the directory to watch. |
| debounceTimer | The time to wait (in milliseconds) before emitting an event after a change is detected for the same file as the previous detected change. |
| ~DirectoryWatcher | ( | ) |
Stop then estroy a DirectoryWatcher.
| void start | ( | ) |
Starts the background thread to watch the directory.
|
noexcept |
Stops the background thread and releases resources.