hotwatch
hotwatch is a Rust library for conveniently watching and handling file changes.
Nightly Rust is required, since I used the box keyword a few times. Sorry.
use Hotwatch;
let mut hotwatch = new.expect;
hotwatch.watch.expect;
hotwatch is a Rust library for conveniently watching and handling file changes.
Nightly Rust is required, since I used the box keyword a few times. Sorry.
use hotwatch::Hotwatch;
let mut hotwatch = Hotwatch::new().expect("Hotwatch failed to initialize.");
hotwatch.watch("war.png", |e: hotwatch::Event| {
if e.changed() {
println!("War has changed.");
}
}).expect("Failed to watch file!");