Currently, our macOS watch service fires an ENTRY_DELETE event on deletion of the root. The default JDK watchers don't appear to do this.
One solution for consistency is to simply update the implementation to not fire an event for the root.
It might make sense for DirectoryWatcher to fire a special type of event like ROOT_DELETED in this case. An application might want to handle that case specially because the watcher stops watching that directory completely once it's been deleted.
Currently, our macOS watch service fires an
ENTRY_DELETE
event on deletion of the root. The default JDK watchers don't appear to do this.One solution for consistency is to simply update the implementation to not fire an event for the root.
It might make sense for
DirectoryWatcher
to fire a special type of event likeROOT_DELETED
in this case. An application might want to handle that case specially because the watcher stops watching that directory completely once it's been deleted.