File watchers can be obtained with the nusys.FileSystem.watch method. Instances of this class will emit signals whenever any file in their watched path is modified.

Variables

@:value(new ArraySignal())changeSignal:Signal<FileWatcherEvent> = new ArraySignal()

Emitted when a watched file is modified.

@:value(new ArraySignal())closeSignal:Signal<NoData> = new ArraySignal()

Emitted when this watcher is fully closed. No further signals will be emitted.

@:value(new ArraySignal())errorSignal:Signal<Error> = new ArraySignal()

Emitted when an error occurs.

Methods

close (?listener:Listener<NoData>):Void

Closes this watcher. This operation is asynchronous and will emit the closeSignal once done. If listener is given, it will be added to the closeSignal.

ref ():Void

unref ():Void