updated documentation on the API

This commit is contained in:
Izaya 2017-08-03 17:55:17 +10:00
parent d116491528
commit 30dc60c79a

View File

@ -17,8 +17,8 @@ Returns the name, parent process, and user ID for process *pid*.
### event ### event
#### event.get() #### event.get()
Gets the next event in the event queue for the process. Gets the next event in the event queue for the process.
#### event.pull(*type*) #### event.pull(*type*,*timeout*)
Gets, and possibly waits, for an event, optionally with *type* Gets, and possibly waits for up to *timeout* seconds, for an event, optionally with *type*.
### buffer ### buffer
#### buffer.create(*w*, *c*) #### buffer.create(*w*, *c*)
@ -81,6 +81,17 @@ Alias to fs.mkdir
Wrapper for fs.list that prints the contents of *path*. Wrapper for fs.list that prints the contents of *path*.
#### cat(*path*) #### cat(*path*)
Prints the contents of the file *path*. Prints the contents of the file *path*.
#### ps(*filter*)
Prints running processes, optionally matching *filter*.
#### mem()
Print out some memory info.
### net
#### net.send(*addr*,*port*,*msg*)
Sends *msg* to *addr* on *port*.
#### net.sendstring(*addr*,*port*,*msg*)
Sends *msg* to *addr* on *port* in *net.mtu* sized chunks.
#### net.recvstring(*addr*,*port*)
### drivers ### drivers
#### tty(*gA*, *sA*, *sI*, *fg*, *bg*) #### tty(*gA*, *sA*, *sI*, *fg*, *bg*)
@ -106,3 +117,5 @@ This is triggered to make a tty driver attached to *session* write *text* to the
Spawns a luash instance for session *sI* Spawns a luash instance for session *sI*
### skex("*fname*") ### skex("*fname*")
Launches an instance of the skex text editor, optionally reading *fname* at startup. Launches an instance of the skex text editor, optionally reading *fname* at startup.
### skex2("*fname*")
Launches an instance of the skex2 text editor, optionally reading *fname* at startup.