Represents a single folder being watched. More...
#include <FileSystemWatcher.h>
Public Member Functions | |
FolderWatcher (Span< char > subFolderRelativePathsBuffer={}) | |
Constructs a folder watcher. | |
Result | stopWatching () |
Stop watching this directory. | |
void | setDebugName (const char *debugName) |
Sets debug name for AsyncFilePoll used on Windows (used only for debug purposes) | |
Public Attributes | |
Function< void(const Notification &)> | notifyCallback |
Function that will be called on a notification. | |
Friends | |
struct | FileSystemWatcher |
struct | FileSystemWatcherAsync |
Represents a single folder being watched.
While in use, the address of this object must not change, as it's inserted in a linked list.
SC::FileSystemWatcher::FolderWatcher::FolderWatcher | ( | Span< char > | subFolderRelativePathsBuffer = {} | ) |
Constructs a folder watcher.
subFolderRelativePathsBuffer | User provided buffer used to sub-folders relative paths. When an empty span is passed, the internal 1Kb buffer is used. This buffer is used on Linux only when watching folders recursively, it's unused on Windows / macOS. |
void SC::FileSystemWatcher::FolderWatcher::setDebugName | ( | const char * | debugName | ) |
Sets debug name for AsyncFilePoll used on Windows (used only for debug purposes)
Result SC::FileSystemWatcher::FolderWatcher::stopWatching | ( | ) |
Stop watching this directory.
After calling it the FolderWatcher can be reused or released.
Function<void(const Notification&)> SC::FileSystemWatcher::FolderWatcher::notifyCallback |
Function that will be called on a notification.