public interface RegisterableWatchService
extends java.nio.file.WatchService
register(java.nio.file.Path, java.nio.file.WatchEvent.Kind<?>...) method. This is because Path.register
does not work on custom watch services.| Modifier and Type | Method and Description |
|---|---|
java.nio.file.WatchKey |
register(java.nio.file.Path path,
java.nio.file.WatchEvent.Kind<?>... kinds)
Register a path for monitoring.
|
java.nio.file.WatchKey register(java.nio.file.Path path,
java.nio.file.WatchEvent.Kind<?>... kinds)
throws java.io.IOException
path - The path to monitor.kinds - The types of events to monitor.java.io.IOException - when the path cannot be registered