nvim_runtime_lua

uv.uv_fs_event_t

uv_fs_event_t - FS Event handle

[uv_handle_t][] functions also apply.

FS Event handles allow the user to monitor a given path for changes, for example, if the file was renamed or there was a generic change in it. This handle uses the best backend for the job on each platform.

Methods3

function uv_fs_event_t.start(path: string, flags: uv.fs_event_start.flags, callback: uv.fs_event_start.callback) -> (success 0 | nil, err nil | string, err_name uv.error_name | nil)

Start the handle with the given callback, which will watch the specified path for changes.

function uv_fs_event_t.stop() -> (success 0 | nil, err nil | string, err_name uv.error_name | nil)

Stop the handle, the callback will no longer be called.

function uv_fs_event_t.getpath() -> (path nil | string, err nil | string, err_name uv.error_name | nil)

Get the path being monitored by the handle.