doc:lua_make-your-own-scripts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:lua_make-your-own-scripts [2014/08/17 10:51] – [The Communication Commands] admin | doc:lua_make-your-own-scripts [2014/10/13 18:20] – [The IO Commands] admin | ||
---|---|---|---|
Line 166: | Line 166: | ||
In case you want to wait for some input strings, of which several could appear, you fill the // | In case you want to wait for some input strings, of which several could appear, you fill the // | ||
+ | |||
+ | |||
+ | ==== The IO Commands ==== | ||
+ | |||
+ | |||
+ | FIXME the whole IO command section is in pure experimental state. There' | ||
+ | |||
+ | |||
+ | OOBD uses its own scheme for file IO, mainly driven by the restriction of a remote user and the need of complex data buffer handling. | ||
+ | |||
+ | |||
+ | Similar to the LUA simple IO model, OOBD has always only just input and output file handle. As long as not redirected, these are stdin and stdout. | ||
+ | |||
+ | |||
+ | As OOBD knows more as only one type of data sources, the parameter '' | ||
+ | |||
+ | |||
+ | . | ||
+ | |||
+ | |||
+ | === ioInput(file name , | ||
+ | |||
+ | |||
+ | Tries to open the file accourding to the following parameter combinations: | ||
+ | |||
+ | |||
+ | ^ filename | ||
+ | |/ | ||
+ | |/ | ||
+ | |URL like '' | ||
+ | |URL like '' | ||
+ | |||
+ | |||
+ | === ioRead(" | ||
+ | |||
+ | |||
+ | Read one line of the input file ending with either %%\%%r%%\%%n or %%\%%n as string without the EOL. In case of input EOF or read errors the function returns nil | ||
+ | |||
+ | |||
+ | === ioRead (" | ||
+ | |||
+ | |||
+ | Read the whole file as string | ||
+ | |||
+ | |||
+ | === ioRead (count) === | ||
+ | |||
+ | |||
+ | Read count number of bytes as string | ||
+ | |||
+ | |||
+ | === ioOutput(URL[, | ||
+ | |||
+ | |||
+ | Try to opens '' | ||
+ | === ioWrite (String) === | ||
+ | |||
+ | |||
+ | Attaches the string content to the output file | ||
+ | |||
+ | |||
+ | \\ | ||
==== Miscellaneous | ==== Miscellaneous |
doc/lua_make-your-own-scripts.txt · Last modified: 2019/04/08 18:43 by admin