Expand description
Filesystem watching via notify (inotify on Linux).
spawn registers a watch on the root directory only — intentionally
non-recursive so that opening a large tree is instant (a recursive
join on the inotify backend walks the whole subtree, which blocks the UI
exactly when the user is waiting for the first listing). The tree adds
watches for individual directories as they are expanded, so auto-updates
still reach every directory the user can actually see.
Every raw notify event passes through the pure event_to_changes
translation onto the model’s Change vocabulary.
Structs§
- Error
- Notify error type.
Enums§
- Recursive
Mode - Indicates whether only the provided directory or its sub-directories as well should be watched
Traits§
- Watcher
- Type that can deliver file activity notifications
Functions§
- event_
to_ changes - Translate one raw notify event into model changes.
- spawn
- Spawn a recursive watcher on
root; every translated change is handed toon_change(which the caller typically fires into a component sender).
Type Aliases§
- Recommended
Watcher - The recommended
Watcherimplementation for the current platform