Last active
January 8, 2017 12:28
-
-
Save ldclakmal/7a2df57a1670d588f74588bdd0e8cb17 to your computer and use it in GitHub Desktop.
Create a WatchService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Path dir = Paths.get("/tmp"); | |
| WatchService watcher = FileSystems.getDefault().newWatchService(); | |
| WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment