Files
neovim/runtime/lua/uv/_meta/uv_fs_poll_t.lua
Christian Clason 0ee5a4d481 feat(meta): vendor luv meta files
Problem: No type information for `vim.uv`.

Solution: Vendor https://github.com/LuaCATS/luv (which is what
luals bundles). This will allow other tooling to work out-of-the-box and
make these files available to users and plugins without the need for
`lazydev.nvim` etc.
2025-04-10 09:13:13 +02:00

38 lines
1.2 KiB
Lua

---@meta
-- luacheck: no unused args
error('Cannot require a meta file')
--- 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 = {} -- luacheck: no unused
--- 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