gmethvin / directory-watcher

A cross-platform Java recursive directory watcher, with a JNA macOS watcher and Scala better-files integration
Apache License 2.0
265 stars 34 forks source link

DirectoryWatcher could be AutoCloseable #99

Open cowwoc opened 1 month ago

cowwoc commented 1 month ago

Consider making DirectoryWatcher implement AutoCloseable

gmethvin commented 3 weeks ago

Sure, AutoCloseable itself should be a pretty easy PR, but actually it looks like watch() already closes the watcher at the end. We probably want to standardize when it closes for you automatically and when you need to do it yourself.