-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It doesn't seem possible to watch or unwatch files from inside the event handler. Something like this:
use hotwatch::{Hotwatch, Event, EventKind};
let mut hotwatch = Hotwatch::new().expect("hotwatch failed to initialize!");
hotwatch.watch("war.png", |event: Event| {
if let EventKind::Modify(_) = event.kind {
println!("War has changed.");
// parse file to get a list of new files to watch
event.unwatch_all();
for filepath in files {
event.watch(filepath,|event: Event| {});
}
}
}).expect("failed to watch file!");Do you plan to implement such a feature soon ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels