public class FileWatchEvent extends Event:
Payload emitted by FileWatcher when the watched file state changes.
kind is one of created, modified or deleted. The event carries the previous and current filesystem metadata so handlers can decide whether a size-only or timestamp-only change matters for their use case.
watcher.changed += lambda(e: FileWatchEvent): print(e.kind)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | existsexists as Boolean |
Whether the file exists after the change. |
| public readonly property | kindkind as String |
Change kind: created, modified, or deleted. |
| public readonly property | lastModifiedlastModified as Long |
Current modification timestamp. |
| public readonly property | pathpath as Path |
Watched path. |
| public readonly property | previousExistspreviousExists as Boolean |
Whether the file existed before the change. |
| public readonly property | previousLastModifiedpreviousLastModified as Long |
Previous modification timestamp. |
| public readonly property | previousSizepreviousSize as ULong |
Previous file size in bytes. |
| public readonly property | sizesize as ULong |
Current file size in bytes. |