You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tested with latest fsnotify (c282820) on Linux/inotify (tested with Ubuntu 16.04) and macOS/kqueue (tested with 10.11.5). I haven't tried Windows.
It's common to want to recursively watch a whole file tree (see #41). This entails:
Whenever a directory in the tree is created, recursively add watches for it and all subdirectories.
When a directory in the tree is deleted, recursively remove watches for it and all subdirectories.
It seems like today, at least on the systems I tested, (2) is unnecessary because fsnotify automatically removes watches for directories that are deleted.
This is great, because it makes it easy to implement recursive watches (the caller just needs to add watches; it doesn't need to keep track of which directories are watched itself). However, this behavior is not documented and not necessarily expected, particularly because it was not the case in the past (see, for instance, #40).
So I think the documentation ought to mention this (and, by corollary, fsnotify ought to commit to maintaining this behavior in the future).
The text was updated successfully, but these errors were encountered:
We talked about this at GopherCon 2017, and the decision was that fsnotify will take care of removing the watch. This is going to have to be handled at each driver level. For instance, Windows does not remove the handle properly automatically.
I've tested with latest fsnotify (c282820) on Linux/inotify (tested with Ubuntu 16.04) and macOS/kqueue (tested with 10.11.5). I haven't tried Windows.
It's common to want to recursively watch a whole file tree (see #41). This entails:
It seems like today, at least on the systems I tested, (2) is unnecessary because fsnotify automatically removes watches for directories that are deleted.
This is great, because it makes it easy to implement recursive watches (the caller just needs to add watches; it doesn't need to keep track of which directories are watched itself). However, this behavior is not documented and not necessarily expected, particularly because it was not the case in the past (see, for instance, #40).
So I think the documentation ought to mention this (and, by corollary, fsnotify ought to commit to maintaining this behavior in the future).
The text was updated successfully, but these errors were encountered: