https://github.com/markcda/fs-change-notifier
Simple library to watch file changes inside given directory
https://github.com/markcda/fs-change-notifier
Last synced: 5 months ago
JSON representation
Simple library to watch file changes inside given directory
- Host: GitHub
- URL: https://github.com/markcda/fs-change-notifier
- Owner: markcda
- License: mit
- Created: 2025-07-01T23:37:00.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-07-14T22:24:17.000Z (12 months ago)
- Last Synced: 2025-07-15T01:36:50.988Z (12 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fs-change-notifier
Simple library to watch file changes inside given directory.
Usage example:
```rust
use fs_change_notifier::{create_watcher, match_event, RecursiveMode};
let root = PathBuf::from(".");
let (mut wr, rx) = create_watcher(|e| log::error!("{e:?}")).unwrap();
wr.watch(&root, RecursiveMode::Recursive).unwrap();
loop {
tokio::select! {
_ = your_job => {},
_ = match_event(&root, rx, &exclude) => {
// do your logic on fs update
},
}
}
```