Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WatchService-based DirectoryWatcher (à la Apache Commons IO FileMonitor) #2030

Open
vorburger opened this issue Apr 12, 2015 · 4 comments
Open
Assignees

Comments

@vorburger
Copy link
Member

Perhaps people would find it useful to find a utility to watch for file changes in Guava? I would have. ;-)

Apache Commons IO had a FileMonitor; that was based on polling files from a background thread. I just published something similar, but mine is based on the modern Java 7 JDK's WatchService instead, see http://blog2.vorburger.ch/2015/04/java-7-watchservice-based.html; DirectoryWatcher etc. src currently part of https://github.com/vorburger/HoTea - if this is of any interest, do let me know here; no offense taken either if you close this as N/A.

@cgdecker
Copy link
Member

Currently Guava is targeted at JDK6, so it can't use anything from JDK7. This is something we could consider in the future though.

@ronshapiro
Copy link
Contributor

@cgdecker now that we have java8 specific code, should we bring this to API review?

@vorburger
Copy link
Member Author

@ronshapiro @cgdecker I'm still alive and if there's any interest for this, would be willing to raise a PR proposing to contribute a starting point for such a thing based on (above) from what I had done in https://github.com/vorburger/HoTea/tree/master/ch.vorburger.hotea/src/main/java/ch/vorburger/hotea/watchdir - I'm sure it would deserve to be torn apart, but could be starting point to kick this off.

@vorburger
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants