🟩 Notifications {add, remove, rename, modified} for files and directories
SC::FileSystemWatcher allows watching directories for changes that happen to them.
🟩 Usable
Library does have basic capabilities and it can be used just fine.
Caller can specify a callback for receiving notifications the SC::FileSystemWatcher::watch method.
Changes are grouped in two categories:
There are two modes in which FileSystemWatcher can be initialized, defining how notifications are delivered:
Mode | Description |
---|---|
SC::FileSystemWatcher::ThreadRunner | Delivers notifications on a background thread. |
SC::FileSystemWatcher::EventLoopRunner | Delivers notifications using Async (SC::AsyncEventLoop). |
Example using SC::FileSystemWatcher::EventLoopRunner:
Example using SC::FileSystemWatcher::ThreadRunner:
This is the list of videos that have been recorded showing some of the internal thoughts that have been going into this library:
Some relevant blog posts are:
The class tries to unify differences between OS specific API to deliver folder change notifications
FSEvents
by CoreServices
is used. ReadDirectoryChangesW
is used. The behavior between these different system also depends on the file system where the watched directory resides.
FSEvents
api is private so using SC::FileSystemWatcher will be very likely causing your app to be rejected from the app store.FileSystemWatcherTest.cpp
show how the API is meant to be used🟦 Complete Features:
💡 Unplanned Features: