hosh icon indicating copy to clipboard operation
hosh copied to clipboard

watch recursive

Open dfa1 opened this issue 6 years ago • 3 comments

Problem watch should be recursive by default.

Solution Would be also possible to register recursively by using an internal class com.sun.nio.file.ExtendedWatchEventModifier.FILE_TREE.

dfa1 avatar Apr 19 '19 09:04 dfa1

com.sun.nio.file.ExtendedWatchEventModifier.FILE_TREE modifier is not supported on MacOS

dfa1 avatar Apr 19 '19 09:04 dfa1

https://gist.github.com/fabriziofortino/83eb36c7b48e9b900c1da1d8508245cd

pros:

  • implements recursive watching
  • no deps besides JDK

dfa1 avatar May 21 '19 16:05 dfa1

https://github.com/gmethvin/directory-watcher

pros:

  • implements recursive watching
  • replaces macosx polling with JNA based implementation of WatchService

cons:

  • requires SLF4J

dfa1 avatar Jul 19 '19 06:07 dfa1