diff options
author | Michael Martin <3277009+flrgh@users.noreply.github.com> | 2022-12-13 09:23:53 -0800 |
---|---|---|
committer | Michael Martin <3277009+flrgh@users.noreply.github.com> | 2022-12-13 09:23:53 -0800 |
commit | b65fb7a406869e572a80ba9acee1e385922c8cb5 (patch) | |
tree | 17eeb8f61919ddc32216d24bb9db110dd459ad5c /meta/3rd/luv/library/luv_dir_t.lua | |
parent | a3835a08fd1736cc7c897f3e5e1779e3c85fc35a (diff) | |
download | lua-language-server-b65fb7a406869e572a80ba9acee1e385922c8cb5.zip |
add luv library annotations
Diffstat (limited to 'meta/3rd/luv/library/luv_dir_t.lua')
-rw-r--r-- | meta/3rd/luv/library/luv_dir_t.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/3rd/luv/library/luv_dir_t.lua b/meta/3rd/luv/library/luv_dir_t.lua new file mode 100644 index 00000000..34417802 --- /dev/null +++ b/meta/3rd/luv/library/luv_dir_t.lua @@ -0,0 +1,34 @@ +---@meta + +--- luv_dir_t +--- +---@class uv.luv_dir_t : userdata +local dir + +--- Closes a directory stream returned by a successful `uv.fs_opendir()` call. +--- +---@return boolean|nil success +---@return uv.error.message|nil err +---@return uv.error.name|nil err_name +--- +---@overload fun(self:uv.luv_dir_t, callback:uv.fs_closedir.callback):uv.uv_fs_t +function dir:closedir() end + +--- Iterates over the directory stream `luv_dir_t` returned by a successful +--- `uv.fs_opendir()` call. A table of data tables is returned where the number +--- of entries `n` is equal to or less than the `entries` parameter used in +--- the associated `uv.fs_opendir()` call. +--- +--- **Returns (sync version):** `table` or `fail` +--- - `[1, 2, 3, ..., n]` : `table` +--- - `name` : `string` +--- - `type` : `string` +--- +--- **Returns (async version):** `uv_fs_t userdata` +--- +---@return uv.fs_readdir.entry[]|nil entries +---@return uv.error.message|nil err +---@return uv.error.name|nil err_name +--- +---@overload fun(self:uv.luv_dir_t, callback:uv.fs_readdir.callback):uv.uv_fs_t +function dir:readdir() end
\ No newline at end of file |