Hilbish/emmyLuaDocs/fs.lua

44 lines
1.0 KiB
Lua
Raw Normal View History

2022-02-25 22:00:39 +00:00
--- @meta
local fs = {}
2022-04-23 04:01:54 +00:00
--- Gives an absolute version of `path`.
--- @param path string
function fs.abs(path) end
2022-06-20 20:47:56 +00:00
--- Gives the basename of `path`. For the rules,
--- see Go's filepath.Base
function fs.basename() end
2022-02-25 22:00:39 +00:00
--- Changes directory to `dir`
2022-02-25 22:15:49 +00:00
--- @param dir string
function fs.cd(dir) end
2022-02-25 22:00:39 +00:00
2022-06-20 20:47:56 +00:00
--- Returns the directory part of `path`. For the rules, see Go's
--- filepath.Dir
function fs.dir() end
--- Glob all files and directories that match the pattern.
--- For the rules, see Go's filepath.Glob
function fs.glob() end
2022-07-13 19:46:40 +00:00
--- Takes paths and joins them together with the OS's
--- directory separator (forward or backward slash).
function fs.join() end
2022-02-25 22:00:39 +00:00
--- Makes a directory called `name`. If `recursive` is true, it will create its parent directories.
2022-02-25 22:15:49 +00:00
--- @param name string
2022-02-25 22:17:22 +00:00
--- @param recursive boolean
2022-02-25 22:15:49 +00:00
function fs.mkdir(name, recursive) end
2022-02-25 22:00:39 +00:00
--- Returns a table of files in `dir`
2022-02-25 22:15:49 +00:00
--- @param dir string
--- @return table
function fs.readdir(dir) end
2022-02-25 22:00:39 +00:00
--- Returns info about `path`
2022-02-25 22:15:49 +00:00
--- @param path string
function fs.stat(path) end
2022-02-25 22:00:39 +00:00
return fs