1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-28 08:03:21 +00:00
CC-Tweaked/src/main/resources/assets/computercraft/lua/rom/help/fs.txt
2017-11-14 23:48:38 +00:00

41 lines
781 B
Plaintext

Functions in the Filesystem API:
fs.list( path )
fs.find( wildcard )
fs.exists( path )
fs.isDir( path )
fs.isReadOnly( path )
fs.getDir( path )
fs.getName( path )
fs.getSize( path )
fs.getDrive( path )
fs.getFreeSpace( path )
fs.makeDir( path )
fs.move( path, path )
fs.copy( path, path )
fs.delete( path )
fs.combine( path, localpath )
fs.open( path, mode )
fs.complete( path, location )
Available fs.open() modes are "r", "w", "a", "rb", "wb" and "ab".
Functions on files opened with mode "r":
readLine()
readAll()
close()
read( number )
Functions on files opened with mode "w" or "a":
write( string )
writeLine( string )
flush()
close()
Functions on files opened with mode "rb":
read()
close()
Functions on files opened with mode "wb" or "ab":
write( byte )
flush()
close()