dotfiles from arch
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
---@meta
|
||||
|
||||
---@class fs.path
|
||||
---@operator div: fs.path
|
||||
local fsPath = {}
|
||||
|
||||
---@return string
|
||||
function fsPath:string()
|
||||
end
|
||||
|
||||
---@return fs.path
|
||||
function fsPath:parent_path()
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function fsPath:is_relative()
|
||||
end
|
||||
|
||||
---@return fs.path
|
||||
function fsPath:filename()
|
||||
end
|
||||
|
||||
---@return fs.path
|
||||
function fsPath:stem()
|
||||
end
|
||||
|
||||
---@return string
|
||||
function fsPath:extension()
|
||||
end
|
||||
|
||||
---@class fs.status
|
||||
local fsStatus = {}
|
||||
|
||||
---@return 'none' | 'not_found' | 'regular' | 'directory' | 'symlink' | 'block' | 'character' | 'fifo' | 'junction' | 'unknown'
|
||||
function fsStatus:type()
|
||||
end
|
||||
|
||||
---@class bee.filesystem
|
||||
local fs = {}
|
||||
|
||||
---@class fs.copy_options
|
||||
---@field overwrite_existing integer
|
||||
local copy_options
|
||||
|
||||
fs.copy_options = copy_options
|
||||
|
||||
---@param path string|fs.path
|
||||
---@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, fs.status
|
||||
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.fullpath(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? integer | `fs.copy_options.overwrite_existing`
|
||||
function fs.copy_file(source, target, options)
|
||||
end
|
||||
|
||||
---@param oldPath fs.path
|
||||
---@param newPath fs.path
|
||||
function fs.rename(oldPath, newPath)
|
||||
end
|
||||
|
||||
---@return fs.path
|
||||
function fs.current_path()
|
||||
end
|
||||
|
||||
---@param path fs.path
|
||||
---@param base fs.path
|
||||
---@return fs.path
|
||||
function fs.relative(path, base)
|
||||
end
|
||||
|
||||
return fs
|
||||
@@ -0,0 +1,32 @@
|
||||
---@meta
|
||||
|
||||
---@class bee.filewatch.instance
|
||||
local instance = {}
|
||||
|
||||
---@param path string
|
||||
function instance:add(path)
|
||||
end
|
||||
|
||||
---@param enable boolean
|
||||
---@return boolean
|
||||
function instance:set_recursive(enable)
|
||||
end
|
||||
|
||||
---@param enable boolean
|
||||
---@return boolean
|
||||
function instance:set_follow_symlinks(enable)
|
||||
end
|
||||
|
||||
---@param callback? fun(path: string):boolean
|
||||
---@return boolean
|
||||
function instance:set_filter(callback)
|
||||
end
|
||||
|
||||
---@class bee.filewatch
|
||||
local fw = {}
|
||||
|
||||
---@return bee.filewatch.instance
|
||||
function fw.create()
|
||||
end
|
||||
|
||||
return fw
|
||||
@@ -0,0 +1,73 @@
|
||||
---@meta
|
||||
|
||||
---@alias bee.socket.protocol
|
||||
---| 'tcp'
|
||||
---| 'udp'
|
||||
---| 'unix'
|
||||
---| 'tcp6'
|
||||
---| 'udp6'
|
||||
|
||||
---@class bee.socket
|
||||
local socket = {}
|
||||
|
||||
---@param protocol bee.socket.protocol
|
||||
---@return bee.socket.fd?
|
||||
---@return string?
|
||||
function socket.create(protocol) end
|
||||
|
||||
---@param readfds? bee.socket.fd[]
|
||||
---@param writefds? bee.socket.fd[]
|
||||
---@param timeout number
|
||||
---@return bee.socket.fd[] # readfds
|
||||
---@return bee.socket.fd[] # writefds
|
||||
function socket.select(readfds, writefds, timeout) end
|
||||
|
||||
---@param handle lightuserdata
|
||||
---@return bee.socket.fd
|
||||
function socket.fd(handle) end
|
||||
|
||||
---@return bee.socket.fd
|
||||
---@return bee.socket.fd
|
||||
function socket.pair() end
|
||||
|
||||
---@class bee.socket.fd
|
||||
local fd = {}
|
||||
|
||||
---@param addr string
|
||||
---@param port? integer
|
||||
---@return boolean
|
||||
---@return string?
|
||||
function fd:bind(addr, port) end
|
||||
|
||||
function fd:close() end
|
||||
|
||||
---@return boolean
|
||||
---@return string?
|
||||
function fd:listen() end
|
||||
|
||||
---@param addr string
|
||||
---@param port integer
|
||||
---@return boolean
|
||||
---@return string?
|
||||
function fd:connect(addr, port) end
|
||||
|
||||
---@param len? integer
|
||||
---@return string | false
|
||||
function fd:recv(len) end
|
||||
|
||||
---@param content string
|
||||
function fd:send(content) end
|
||||
|
||||
---@return lightuserdata
|
||||
function fd:handle() end
|
||||
|
||||
---@return lightuserdata
|
||||
function fd:detach() end
|
||||
|
||||
---@return boolean
|
||||
function fd:status() end
|
||||
|
||||
---@return bee.socket.fd
|
||||
function fd:accept() end
|
||||
|
||||
return socket
|
||||
@@ -0,0 +1,36 @@
|
||||
---@meta bee.thread
|
||||
|
||||
---@class bee.thread
|
||||
local thread = {}
|
||||
|
||||
---@param time number
|
||||
function thread.sleep(time) end
|
||||
|
||||
---@param name string
|
||||
function thread.newchannel(name) end
|
||||
|
||||
---@param name string
|
||||
---@return bee.thread.channel
|
||||
function thread.channel(name) end
|
||||
|
||||
---@param script string
|
||||
---@return bee.thread.thread
|
||||
function thread.thread(script) end
|
||||
|
||||
---@return string?
|
||||
function thread.errlog() end
|
||||
|
||||
---@class bee.thread.channel
|
||||
local channel = {}
|
||||
|
||||
function channel:push(...) end
|
||||
|
||||
---@return ...
|
||||
function channel:pop() end
|
||||
|
||||
---@return ...
|
||||
function channel:bpop() end
|
||||
|
||||
---@class bee.thread.thread
|
||||
|
||||
return thread
|
||||
Reference in New Issue
Block a user