Sample events in watcher. Returns an event or nil.
Example:
# Example for ev_event
try
println ev_event()
catch err
println "No event available"
endtry
True if watcher should still be available for use.
Example:
# Example for ev_exists
watcher, err = ev_watch("/tmp")
println ev_exists(watcher)
ev_watch_close(watcher)
Is notify_event of type str_event_type? str_event_type can be one of create, write, remove, rename or chmod.
Example:
# Example for ev_mask
try
ev_mask(0, 1)
catch err
println "Error"
endtry
Initialise a file system watch object. Returns the new watcher and 0 error code on success,
otherwise nil and >0 code. 1->create_watcher_failed, 2->file_path_failure
Example:
# Example for ev_watch
ev_watch("hello") # usage
Add another file path to watcher. Returns 0 on success, otherwise >0 code. e.g. 13->file permissions.
Example:
# Example for ev_watch_add
try
println ev_watch_add(0, "/tmp")
catch err
println "Error"
endtry
Dispose of a watcher object.
Example:
# Example for ev_watch_close
try
ev_watch_close(0)
catch err
println "Error"
endtry
Remove an existing file path in watcher. Returns 0 on success, otherwise >0 code.
Example:
# Example for ev_watch_remove
try
ev_watch_remove(0, "/tmp")
catch err
println "Error"
endtry