1 unstable release
new 0.1.0 | Jan 24, 2025 |
---|
#592 in Filesystem
103 downloads per month
96KB
Watchr
A simple and efficient Rust library for watching file system changes. It is built on top of notify and tokio crates.
Features
- Simple API for watching file system changes like creation, modification, deletion and renaming
- Fully async-compatible using
tokio
runtime - Provides wrapper over
notify
events
Installation
Add watchr_filesystem
to your Cargo.toml
:
[dependencies]
watchr_filesystem = "0.1.0"
Usage
use watchr_filesystem::FileWatcher;
let watcher = FileWatcher::new(vec![PathBuf::from("./destination")]);
watcher.watch(callbackFunction);
License
This project is released under the MIT License.
lib.rs
:
Watchr
A simple file watcher that watches a list of paths and calls a callback when any of them change
Dependencies
~3–11MB
~101K SLoC