|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectname.pachler.nio.file.ext.ExtendedWatchEventKind
public class ExtendedWatchEventKind
Provides non-standard watch event kinds that enable more specialized watch features.
ENTRY_RENAME_FROM
and ENTRY_RENAME_TO
event
kinds enable more fine grained file rename tracing. When only the standard
event kinds are specified with Path.register(), renaming a file in a
watched directory will only yield an StandardWatchEventKind.ENTRY_CREATE
and an
StandardWatchEventKind.ENTRY_DELETE
event, which makes it indistinguishable from actual file creation and
deletion events.
If ENTRY_RENAME_FROM
and/or ENTRY_RENAME_TO
are
specified, renamed files will be reported with respective events. Note that
if both ENTRY_RENAME_FROM
and ENTRY_RENAME_TO
are specified, a ENTRY_RENAME_FROM
event for a file will
be immediately be followed by a ENTRY_RENAME_TO
event for the
same file.
Field Summary | |
---|---|
static WatchEvent.Kind<Path> |
ENTRY_RENAME_FROM
Indicates the old file name of a renamed file. |
static WatchEvent.Kind<Path> |
ENTRY_RENAME_TO
Indicates the new file name of a renamed file. |
static WatchEvent.Kind<java.lang.Void> |
KEY_INVALID
Indicates that the given WatchKey has become invalid. |
Constructor Summary | |
---|---|
ExtendedWatchEventKind()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static WatchEvent.Kind<Path> ENTRY_RENAME_FROM
WatchEvent
's WatchEvent.context()
method will return
a Path that indicates the previous name that the file had.
public static WatchEvent.Kind<Path> ENTRY_RENAME_TO
WatchEvent
's WatchEvent.context()
method will return
a Path that indicates the new name of the file.
public static WatchEvent.Kind<java.lang.Void> KEY_INVALID
WatchKey
has become invalid. This
can happen for a number of reasons:
WatchKey.cancel()
.WatchService
has been closed.
Constructor Detail |
---|
public ExtendedWatchEventKind()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |