watch


Description:

public static Result<FileWatcher,Error> watch (Path path)

Starts watch for file or directory.

Parameters:

path

target path.

Returns:

Result.ok(watcher instance), or Result.error(WatcherError.PATH_NOT_FOUND / MONITOR_SETUP_FAILED).