|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
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. jpathwatch
defines a set of modifiers in the ExtendedWatchEventModifier
class. |
Class Summary | |
---|---|
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. |
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. a file modification or a rename). |
WatchKey | A WatchKey represents a Watchable 's registration for events with a
WatchService . |
WatchService | A service that provides monitoring for Watchable s, reporting changes
on these objects (in the case of jpathwatch, these are Path
instances). |
Exception Summary | |
---|---|
ClosedWatchServiceException | This exception is thrown by a WatchService method if that service has been closed. |
The name.pachler.nio.file package provides source-compatible implementation of JDK7's WatchService API. It only provides classes and interfaces needed to implement a WatchService, where the java.nio.file package in Java 7 offers much more functionality.
However, all code using this package should work also with Java 7's implementation of the WatchService (provided that all import statements are changed to import java.nio.file rather than this package). All classes in this package also exist in Java 7'sjava.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.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |