| Crates.io | fs-change-notifier |
| lib.rs | fs-change-notifier |
| version | 0.2.0 |
| created_at | 2025-07-01 23:38:48.846343+00 |
| updated_at | 2026-01-11 10:52:59.274854+00 |
| description | Simple library to watch file changes inside given directory |
| homepage | |
| repository | https://github.com/markcda/fs-change-notifier |
| max_upload_size | |
| id | 1734224 |
| size | 20,592 |
Simple library to watch file changes inside given directory.
Usage example:
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
},
}
}