public abstract class Path extends java.lang.Object implements Watchable
Modifier | Constructor and Description |
---|---|
protected |
Path() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(java.lang.Object obj) |
abstract int |
hashCode() |
abstract WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>... events)
Registers the file system path (a directory) with the given WatchService
and provides a WatchKey as a handle for that registration.
|
abstract WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>[] events,
WatchEvent.Modifier... modifiers)
Registers the file system path (a directory) with the given
WatchService and provides a WatchKey as a handle for that registration. |
abstract Path |
resolve(Path other) |
abstract java.lang.String |
toString() |
public abstract boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public abstract int hashCode()
hashCode
in class java.lang.Object
public abstract WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws java.io.IOException
Watchable
register(watcher, events, new WatchEvent.Modifier[0]);
register
in interface Watchable
java.io.IOException
register(name.pachler.nio.file.WatchService, name.pachler.nio.file.WatchEvent.Kind<?>[], name.pachler.nio.file.WatchEvent.Modifier[])
public abstract WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws java.io.IOException
Watchable
WatchService
and provides a WatchKey as a handle for that registration.
The events and modifier lists determine the events that the
WatchService
will report.WatchService
, the same WatchKey
will be returned. In this case,
the WatchKey
's watch settings are altered to match the new event
and modifier lists. Note that such changes may result in
StandardWatchEventKind.OVERFLOW
events to be reported on some platforms.StandardWatchEventKind
, ExtendedWatchEventKind
and
ExtendedWatchEventModifier
may be supported on a target platform
(typically though, in this implementation, all event kinds defined in
StandardWatchEventKind
are always supported).register
in interface Watchable
watcher
- a valid WatchService
instance.events
- The events to register for. The event kinds defined in
StandardWatchEventKind
and ExtendedWatchEventKind
define valid event kinds that can
be passed in here. Not that not all event kinds may be supported on
a given platform, so see the documentation of a specific event kind.modifiers
- The event modifiers to use when registering. WatchEvent.Modifier
s
define special behaviour that's expected from the WatchService
. Note
that some event modifiers may not be supported on a given platform;
see the specific modifier for details.WatchKey
that represents the registration.java.io.IOException
- for general I/O errorsStandardWatchEventKind
,
ExtendedWatchEventKind
,
ExtendedWatchEventModifier
public abstract java.lang.String toString()
toString
in class java.lang.Object