See: Description
Interface | Description |
---|---|
Watchable |
A watchable is an object that can be registered with a
WatchService
to be monitored for changes via it's register methods. |
WatchEvent.Kind<T> |
Instances of this class act as tags to identify different kinds of
events (like file creation or deletion)
|
WatchEvent.Modifier<T> |
A modifier can be specified to
register to
change the way changes to a watchable are reported. |
Class | Description |
---|---|
FileSystem |
Represents a file system.
|
FileSystems |
Provides static method to get the default FileSystem object.
|
NotDirectoryException |
Indicates that a file system reference was given that references a file
type that is not a directory, as the invoked method had expected.
|
Path |
This class represents an abstract Path object that a WatchService can
operate on.
Note that Path is a new way of representing file system paths in JDK7 and is included here to provide source level compatibility. |
Paths |
Factory class for Path instances.
|
StandardWatchEventKind |
This class contains the standard watch event kinds, which are basically
flags that indicate which events a WatchService should report when a
Watchable is registered with a WatchService.
|
WatchEvent<T> |
Instances of this class hold the information of a particular change to
an element below the watched file system object (e.g.
|
WatchKey | |
WatchService |
Exception | Description |
---|---|
ClosedWatchServiceException |
This exception is thrown by a WatchService method if that service has been
closed.
|
java.nio.file
package
as well, and with the exception of the
Path
and
FileSystem
classes all have the same interface, making jpathwatch a subset of
java.nio.file
.
Note that Path
and WatchService
cannot be instantiated
directly. In both JDK7 and jfilewatch factory methods are required for this;
see FileSystem
,
FileSystems
and
Paths
for details.
jpathwatch's WatchService implementation intends to be a non-chatty library - it normally never writes to standard output. However, certain conditions might trigger it to log warnings and errors. If you see log messages like this, they might indicate a bug in the library, so please report them on the jpathwatch website.
jpathwatch uses the "name.pachler.nio.file" namespace for logging, so
logging can be turned off by calling
Logger.getLogger("name.pachler.nio.file").setLevel(Level.OFF);
.
Note that this shouldn't be necessary under ordinary circumstances.