Module notify
Cross-platform filesystem notification library.
notify provides filesystem watching capabilities,
detecting when files or directories are created, modified, deleted, or renamed.
It uses platform-native APIs (inotify on Linux, FSEvents on macOS, ReadDirectoryChangesW on Windows).
The main entry point is recommended_watcher which creates a watcher
appropriate for the current platform.
Events are delivered through a channel or callback.
Examples
Watch a directory for changes:
use ;
use channel;
use Duration;
let = channel;
let mut watcher = recommended_watcher.unwrap;
watcher.watch.unwrap;
loop
Modules
Structs
- Config Watcher Backend configuration
- Error Notify error type.
- Event Notify event.
- INotifyWatcher Watcher implementation based on inotify
-
NullWatcher
Stub
Watcherimplementation -
PollWatcher
Polling based
Watcherimplementation.
Enums
- ErrorKind Error kinds
- EventKind Top-level event kind.
- RecursiveMode Indicates whether only the provided directory or its sub-directories as well should be watched
- WatcherKind Watcher kind enumeration
Traits
- EventHandler The set of requirements for watcher event handling functions.
- PathsMut Providing methods for adding and removing paths to watch.
- Watcher Type that can deliver file activity notifications
Functions
-
recommended_watcher
Convenience method for creating the
RecommendedWatcherfor the current platform.
Type Aliases
-
RecommendedWatcher
The recommended
Watcherimplementation for the current platform -
Result
Type alias to use this library's
Errortype in a Result