summaryrefslogtreecommitdiff
path: root/meta/3rd/luv/library/uv_fs_poll_t.lua
diff options
context:
space:
mode:
authorMichael Martin <3277009+flrgh@users.noreply.github.com>2022-12-13 09:23:53 -0800
committerMichael Martin <3277009+flrgh@users.noreply.github.com>2022-12-13 09:23:53 -0800
commitb65fb7a406869e572a80ba9acee1e385922c8cb5 (patch)
tree17eeb8f61919ddc32216d24bb9db110dd459ad5c /meta/3rd/luv/library/uv_fs_poll_t.lua
parenta3835a08fd1736cc7c897f3e5e1779e3c85fc35a (diff)
downloadlua-language-server-b65fb7a406869e572a80ba9acee1e385922c8cb5.zip
add luv library annotations
Diffstat (limited to 'meta/3rd/luv/library/uv_fs_poll_t.lua')
-rw-r--r--meta/3rd/luv/library/uv_fs_poll_t.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/3rd/luv/library/uv_fs_poll_t.lua b/meta/3rd/luv/library/uv_fs_poll_t.lua
new file mode 100644
index 00000000..2e65cc42
--- /dev/null
+++ b/meta/3rd/luv/library/uv_fs_poll_t.lua
@@ -0,0 +1,35 @@
+---@meta
+
+--- FS Poll handles allow the user to monitor a given path for changes. Unlike
+--- `uv_fs_event_t`, fs poll handles use `stat` to detect when a file has changed so
+--- they can work on file systems where fs event handles can't.
+---
+---@class uv.uv_fs_poll_t : uv.uv_handle_t
+local fs_poll
+
+--- Get the path being monitored by the handle.
+---
+---@return string|nil path
+---@return uv.error.message|nil err
+---@return uv.error.name|nil err_name
+function fs_poll:getpath() end
+
+--- Check the file at `path` for changes every `interval` milliseconds.
+---
+--- **Note:** For maximum portability, use multi-second intervals. Sub-second
+--- intervals will not detect all changes on many file systems.
+---
+---@param path string
+---@param interval integer
+---@param callback uv.fs_poll_start.callback
+---@return 0|nil success
+---@return uv.error.message|nil err
+---@return uv.error.name|nil err_name
+function fs_poll:start(path, interval, callback) end
+
+--- Stop the handle, the callback will no longer be called.
+---
+---@return 0|nil success
+---@return uv.error.message|nil err
+---@return uv.error.name|nil err_name
+function fs_poll:stop() end \ No newline at end of file