updated docs to reflect e39451b

This commit is contained in:
Izaya 2017-08-01 21:41:54 +10:00
parent e39451bfac
commit 50d47eba49
1 changed files with 26 additions and 0 deletions

View File

@ -41,6 +41,18 @@ Reads *length* bytes of data from *handle*. *length* is usually limited to 2048.
Writes *data* to *handle*.
#### fs.readall(*handle*)
Returns as much data as can be read from *handle*.
#### fs.list(*path*)
Returns a table of files contained in directory *path*
#### fs.mkdir(*path*)
Creates a directory at *path*
#### fs.rm(*path*)
Removes a file or (empty) directory at *path*.
#### fs.exists(*path*)
Returns true if a file or directory *path* exists.
#### fs.isdir(*path*)
Returns true if *path* is a directory.
#### fs.cd(*path*)
Changes the current directory to either *path* or *os.getenv("PWD")*/*path*.
### io
#### write(...) or io.write(...)
@ -58,6 +70,18 @@ Writes *data* to *fobj* (if in write mode)
##### fobj:close()
Closes *fobj*, flushing buffers and removing the object from memory.
### shutil
#### cd(*path*)
Alias to fs.cd
#### rm(*path*)
Alias to fs.rm
#### mkdir(*path*)
Alias to fs.mkdir
#### ls(*path*)
Wrapper for fs.list that prints the contents of *path*.
#### cat(*path*)
Prints the contents of the file *path*.
### drivers
#### tty(*gA*, *sA*, *sI*, *fg*, *bg*)
Creates a GPU driver instance for GPU *gA* and screen *sA* attached to session *sI*, optionally with foreground and background colours *fg* and *bg*.
@ -80,3 +104,5 @@ This is triggered to make a tty driver attached to *session* write *text* to the
## Applications
### luash(*sI*)
Spawns a luash instance for session *sI*
### skex("*fname*")
Launches an instance of the skex text editor, optionally reading *fname* at startup.