watchingFile

fun <R> Program.watchingFile(file: File, valueChangedEvent: Event<R>? = null, requestStopEvent: Event<Unit>? = null, transducer: (File) -> R): FileWatcherDelegate<R>(source)

Delegate value to a file watcher

Since

0.4.3

Parameters

file

the file to watch

valueChangedEvent

the event that is triggered when the value (after transformation) has changed

requestStopEvent

an event that can be triggered to request the watcher to stop

transducer

a function that transforms a File into a value of type R

See also