pub enum WatchEvent {
Create,
Delete,
Update,
Initial,
DebugWatch,
}Expand description
Type of file system event.
These events correspond to inotify events, but are simplified into three categories that cover most use cases.
Variants§
Create
File or directory was created.
Also triggered when a file/directory is moved into a watched directory.
Delete
File or directory was deleted.
Also triggered when a file/directory is moved out of a watched directory.
Update
File content was modified.
Triggered on IN_MODIFY (content changed) or IN_CLOSE_WRITE (file
opened for writing was closed). Directory content changes (files added/removed)
are reported as Create/Delete instead.
Initial
Initial event for preexisting files/directories.
Only emitted when Watcher::watch_initial is enabled. Fired once
for each file or directory that matches the patterns at the time the
watcher starts, before any file system events are processed.
DebugWatch
Debug event: a watch was added on this directory.
Only emitted when Watcher::debug_watches is enabled. Useful for
understanding which directories are being watched based on your patterns.
Trait Implementations§
Source§impl Clone for WatchEvent
impl Clone for WatchEvent
Source§fn clone(&self) -> WatchEvent
fn clone(&self) -> WatchEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more