-
-
Notifications
You must be signed in to change notification settings - Fork 966
Removing recursive watches #41
Copy link
Copy link
Closed
Labels
Description
I've implemented recursive watching for a few different projects. The way I've basically done this is:
- Add a watch for the root dir
- When there's a
createevent, walk the created dir and add new watches for alldirs - When there's a
removeevent, remove the watch for that dir
(I'm using fsnotify.v1.) I've realized that this isn't correct, because I don't delete the watches recursively. So I guess I need to keep track of the full tree of watches on my end as well? Maybe fsnotify could help out by exposing a 'delete all watches with this prefix' method or something.
Suggestions?
Additionally, #40 means that even if I could know all the dirs to remove watches for, I still couldn't delete them.
Reactions are currently unavailable