mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 03:30:29 +00:00
ef8da8054f
This adds documentation comments to many of CC's Lua APIs, and a couple of the Java ones, through the use of stubs. We then export these to HTML using illuaminate [1] and upload them to our documentation site [2]. Uploads currently occur on pushes to master and any release/tag. The site is entirely static - there is no way to switch between versions, etc... but hopefully we can improve this in the future. [1]: github.com/SquidDev/illuaminate/ [2]: https://tweaked.cc/
43 lines
1.1 KiB
Lua
43 lines
1.1 KiB
Lua
--- The FS API allows you to manipulate files and the filesystem.
|
|
--
|
|
-- @module fs
|
|
|
|
function list(path) end
|
|
function combine(base, child) end
|
|
function getName(path) end
|
|
function getSize(path) end
|
|
function exists(path) end
|
|
function isDir(path) end
|
|
function isReadOnly(path) end
|
|
function makeDir(path) end
|
|
function move(from, to) end
|
|
function copy(from, to) end
|
|
function delete(path) end
|
|
function open(path, mode) end
|
|
function getDrive(path) end
|
|
function getFreeSpace(path) end
|
|
function find(pattern) end
|
|
function getDir(path) end
|
|
|
|
--- A file handle which can be read from.
|
|
--
|
|
-- @type ReadHandle
|
|
-- @see fs.open
|
|
local ReadHandle = {}
|
|
function ReadHandle.read(count) end
|
|
function ReadHandle.readAll() end
|
|
function ReadHandle.readLine(with_trailing) end
|
|
function ReadHandle.seek(whence, offset) end
|
|
function ReadHandle.close() end
|
|
|
|
--- A file handle which can be written to.
|
|
--
|
|
-- @type WriteHandle
|
|
-- @see fs.open
|
|
local WriteHandle = {}
|
|
function WriteHandle.write(text) end
|
|
function WriteHandle.writeLine(text) end
|
|
function WriteHandle.flush(text) end
|
|
function WriteHandle.seek(whence, offset) end
|
|
function WriteHandle.close() end
|