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 think it would be a nice addition to allow watching a directory non-recursively.
Currently, when registering a Path with the builder, the watcher is either set up with the FILE_TREE modifier or recursively for all descendant directories, depending on system capabilities. I circumvent this by instantiating the watcher with an empty path list, then initializing paths and pathHashes with a single path and hashes for all files, and then calling register(path, false), all using reflection. This does what I want, but needless to say, that's not great practice ;)
Thanks for the great library!
The text was updated successfully, but these errors were encountered:
I think it would certainly be possible. The logic would be relatively simple except that I'm not quite sure how to configure non-recursive watching for macOS, so maybe we'll just have to filter events that are in a subdirectory.
I'm definitely open to adding the feature. Are you interested in attempting a fix?
I think it would be a nice addition to allow watching a directory non-recursively.
Currently, when registering a
Path
with the builder, the watcher is either set up with theFILE_TREE
modifier or recursively for all descendant directories, depending on system capabilities. I circumvent this by instantiating the watcher with an empty path list, then initializingpaths
andpathHashes
with a single path and hashes for all files, and then callingregister(path, false)
, all using reflection. This does what I want, but needless to say, that's not great practice ;)Thanks for the great library!
The text was updated successfully, but these errors were encountered: