- All Superinterfaces:
AutoCloseable
,Closeable
File system watcher service. This watcher can be used to receive notifications about a specific path.
- Author:
- Stuart Douglas
-
Method Summary
Modifier and TypeMethodDescriptionvoid
unwatchPath
(File file, FileChangeCallback callback) Stop watching a path.void
watchPath
(File file, FileChangeCallback callback) Watch the given path recursively, and invoke the callback when a change is made.
-
Method Details
-
watchPath
Watch the given path recursively, and invoke the callback when a change is made.- Parameters:
file
- The path to watchcallback
- The callback
-
unwatchPath
Stop watching a path.- Parameters:
file
- the pathcallback
- the callback
-