notify-rs / notify

🔭 Cross-platform filesystem notification library for Rust.
https://docs.rs/notify
2.76k stars 222 forks source link

Feature request: unwatch subpaths #563

Open rbalicki2 opened 9 months ago

rbalicki2 commented 9 months ago

Thank you for the wonderful crate. I think it would make sense if one was able to unwatch paths, after having watched a parent path. e.g.:

watcher.watch("/")
assert!(watcher.unwatch("/foo").is_ok())

Anyway, no big deal if this isn't on the roadmap, I can presumably filter based on the event paths. But I thought it was worth suggesting!

Thank you!