Stay organized with collections
Save and categorize content based on your preferences.
StandardWatchEventKinds
class StandardWatchEventKinds
Defines the standard event kinds.
Summary
Properties
ENTRY_CREATE
static val ENTRY_CREATE: WatchEvent.Kind<Path!>!
Directory entry created.
When a directory is registered for this event then the WatchKey
is queued when it is observed that an entry is created in the directory or renamed into the directory. The event count
for this event is always 1
.
ENTRY_DELETE
static val ENTRY_DELETE: WatchEvent.Kind<Path!>!
Directory entry deleted.
When a directory is registered for this event then the WatchKey
is queued when it is observed that an entry is deleted or renamed out of the directory. The event count
for this event is always 1
.
ENTRY_MODIFY
static val ENTRY_MODIFY: WatchEvent.Kind<Path!>!
Directory entry modified.
When a directory is registered for this event then the WatchKey
is queued when it is observed that an entry in the directory has been modified. The event count
for this event is 1
or greater.
OVERFLOW
static val OVERFLOW: WatchEvent.Kind<Any!>!
A special event to indicate that events may have been lost or discarded.
The context
for this event is implementation specific and may be null
. The event count
may be greater than 1
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# StandardWatchEventKinds\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nStandardWatchEventKinds\n=======================\n\n```\nclass StandardWatchEventKinds\n```\n\n|---|--------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.nio.file.StandardWatchEventKinds](#) |\n\nDefines the *standard* event kinds.\n\nSummary\n-------\n\n| Properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| static [WatchEvent.Kind](/reference/kotlin/java/nio/file/WatchEvent.Kind)\\\u003c[Path](/reference/kotlin/java/nio/file/Path)!\\\u003e! | [ENTRY_CREATE](#ENTRY_CREATE:java.nio.file.WatchEvent.Kind) Directory entry created. |\n| static [WatchEvent.Kind](/reference/kotlin/java/nio/file/WatchEvent.Kind)\\\u003c[Path](/reference/kotlin/java/nio/file/Path)!\\\u003e! | [ENTRY_DELETE](#ENTRY_DELETE:java.nio.file.WatchEvent.Kind) Directory entry deleted. |\n| static [WatchEvent.Kind](/reference/kotlin/java/nio/file/WatchEvent.Kind)\\\u003c[Path](/reference/kotlin/java/nio/file/Path)!\\\u003e! | [ENTRY_MODIFY](#ENTRY_MODIFY:java.nio.file.WatchEvent.Kind) Directory entry modified. |\n| static [WatchEvent.Kind](/reference/kotlin/java/nio/file/WatchEvent.Kind)\\\u003c[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!\\\u003e! | [OVERFLOW](#OVERFLOW:java.nio.file.WatchEvent.Kind) A special event to indicate that events may have been lost or discarded. |\n\nProperties\n----------\n\n### ENTRY_CREATE\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ENTRY_CREATE: WatchEvent.Kind\u003cPath!\u003e!\n```\n\nDirectory entry created.\n\nWhen a directory is registered for this event then the [WatchKey](/reference/kotlin/java/nio/file/WatchKey) is queued when it is observed that an entry is created in the directory or renamed into the directory. The event [count](/reference/kotlin/java/nio/file/WatchEvent#count()) for this event is always `1`. \n\n### ENTRY_DELETE\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ENTRY_DELETE: WatchEvent.Kind\u003cPath!\u003e!\n```\n\nDirectory entry deleted.\n\nWhen a directory is registered for this event then the [WatchKey](/reference/kotlin/java/nio/file/WatchKey) is queued when it is observed that an entry is deleted or renamed out of the directory. The event [count](/reference/kotlin/java/nio/file/WatchEvent#count()) for this event is always `1`. \n\n### ENTRY_MODIFY\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ENTRY_MODIFY: WatchEvent.Kind\u003cPath!\u003e!\n```\n\nDirectory entry modified.\n\nWhen a directory is registered for this event then the [WatchKey](/reference/kotlin/java/nio/file/WatchKey) is queued when it is observed that an entry in the directory has been modified. The event [count](/reference/kotlin/java/nio/file/WatchEvent#count()) for this event is `1` or greater. \n\n### OVERFLOW\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val OVERFLOW: WatchEvent.Kind\u003cAny!\u003e!\n```\n\nA special event to indicate that events may have been lost or discarded.\n\nThe [context](/reference/kotlin/java/nio/file/WatchEvent#context()) for this event is implementation specific and may be `null`. The event [count](/reference/kotlin/java/nio/file/WatchEvent#count()) may be greater than `1`. \n**See Also**\n\n- [java.nio.file.WatchService](/reference/kotlin/java/nio/file/WatchService)"]]