onFile
A nullable property to set a function or lambda for responding to file events. This function is invoked whenever a new file event is received, providing a convenient way to process or react to file events.
Note that this property allows for the assignment of a singular behavior at a time, as any new assignment will override the previous one. For scenarios requiring multiple behaviors in response to file event, it is advisable to utilize EventEmitter.addListener.
To deactivate the current behavior, simply set this property to null.
Setting a Behavior Example:
onFile = { pnFileEventResult ->
println("File event: ${pnFileEventResult.message}")
}Content copied to clipboard
Removing a Behavior Example:
onFile = nullContent copied to clipboard