FileWatcherEvent
classin packageklyn.io
public class FileWatcherEvent extends Event:
└ FileWatcherEvent

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 distinguish a content-size change from a timestamp-only update.

watcher.changed += lambda(e: FileWatcherEvent): print(e.kind)
Properties
Modifier and Type Member Description
public readonly property exists
exists as Boolean
Whether the file exists after the change.
public readonly property kind
kind as String
Change kind: created, modified, or deleted.
public readonly property lastModified
lastModified as Long
Current modification timestamp.
public readonly property path
path as Path
Watched path.
public readonly property previousExists
previousExists as Boolean
Whether the file existed before the change.
public readonly property previousLastModified
previousLastModified as Long
Previous modification timestamp.
public readonly property previousSize
previousSize as ULong
Previous file size in bytes.
public readonly property size
size as ULong
Current file size in bytes.
Inherited Properties
propertyInherited Properties from Event: source, timestamp
Constructors
Modifier and Type Member Description
public FileWatcherEvent
FileWatcherEvent(source as Object, path as Path, kind as String, previousExists as Boolean, exists as Boolean, previousLastModified as Long, lastModified as Long, previousSize as ULong, size as ULong):
Creates a file-watcher event payload.