Cleans up underlying resources.
Fills the buffer with file/folder events and returns the number of events consumed. Returns 0 when the buffer is drained.
Registers the object in the underlying event loop and sends notifications related to buffer activity by calling the specified handler.
Removes the directory and its files from the event watch list. Recursive will remove all subdirectories in the watch list.
Starts watching for file events in the specified directory, recursing into subdirectories will add those and its files to the watch list as well.
Check this property to make sure the event loop hasn't failed
Returns a human-readable error message from the underlying operating system.
Watches one or more directories in the local filesystem for the specified events by calling a custom event handler asynchroneously when they occur.
Usage: run() the object, start watching directories, receive an event in your handler, read the changes by draining the buffer.