diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 00:48:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 00:48:13 +0800 |
commit | d4281c472d88b4c69ea1f2c76703a974aca940c2 (patch) | |
tree | 6629c274f390f4e2f61a38fd57fba9d7096bf8f8 /script/meta/bee/filesystem.lua | |
parent | 7c9503e0f1d2566a9a6df9f5c309af48972cabb3 (diff) | |
download | lua-language-server-d4281c472d88b4c69ea1f2c76703a974aca940c2.zip |
more `bee.filesystem`
Diffstat (limited to 'script/meta/bee/filesystem.lua')
-rw-r--r-- | script/meta/bee/filesystem.lua | 73 |
1 files changed, 68 insertions, 5 deletions
diff --git a/script/meta/bee/filesystem.lua b/script/meta/bee/filesystem.lua index 54c17c37..f6cdff79 100644 --- a/script/meta/bee/filesystem.lua +++ b/script/meta/bee/filesystem.lua @@ -1,12 +1,12 @@ ----@class fspath ----@operator div: fspath +---@class fs.path +---@operator div: fs.path local fsPath = {} ---@return string function fsPath:string() end ----@return fspath +---@return fs.path function fsPath:parent_path() end @@ -14,15 +14,78 @@ end function fsPath:is_relative() end ----@return fspath +---@return fs.path function fsPath:filename() end +---@class fs.status +local fsStatus = {} + +---@return string +function fsStatus:type() +end + +---@class fs local fs = {} +---@class fs.copy_options +---@field overwrite_existing integer +local copy_options + +fs.copy_options = copy_options + ---@param path string ----@return fspath +---@return fs.path function fs.path(path) end +---@return fs.path +function fs.exe_path() +end + +---@param path fs.path +---@return boolean +function fs.exists(path) +end + +---@param path fs.path +---@return boolean +function fs.is_directory(path) +end + +---@param path fs.path +---@return fun():fs.path +function fs.pairs(path) +end + +---@param path fs.path +---@return fs.path +function fs.canonical(path) +end + +---@param path fs.path +---@return fs.path +function fs.absolute(path) +end + +---@param path fs.path +function fs.create_directories(path) +end + +---@param path fs.path +---@return fs.status +function fs.symlink_status(path) +end + +---@param path fs.path +---@return boolean +function fs.remove(path) +end + +---@param source fs.path +---@param target fs.path +---@param options? `fs.copy_options.overwrite_existing` +function fs.copy_file(source, target, options) +end + return fs |