doc:lua_make-your-own-scripts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
doc:lua_make-your-own-scripts [2014/10/05 16:37] – [The IO Commands] admin | doc:lua_make-your-own-scripts [2014/10/13 18:20] – [The IO Commands] admin | ||
---|---|---|---|
Line 169: | Line 169: | ||
==== The IO Commands ==== | ==== The IO Commands ==== | ||
+ | |||
FIXME the whole IO command section is in pure experimental state. There' | FIXME the whole IO command section is in pure experimental state. There' | ||
Line 174: | Line 175: | ||
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. | 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. | 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 '' | As OOBD knows more as only one type of data sources, the parameter '' | ||
+ | |||
. | . | ||
- | |||
- | |||
=== ioInput(file name , | === ioInput(file name , | ||
+ | |||
Tries to open the file accourding to the following parameter combinations: | Tries to open the file accourding to the following parameter combinations: | ||
+ | ^ filename | ||
+ | |/ | ||
+ | |/ | ||
+ | |URL like '' | ||
+ | |URL like '' | ||
- | ^ 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 (" | ||
- | === 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 | Read the whole file as string | ||
+ | |||
=== ioRead (count) === | === ioRead (count) === | ||
+ | |||
+ | |||
Read count number of bytes as string | Read count number of bytes as string | ||
+ | |||
=== ioOutput(URL[, | === ioOutput(URL[, | ||
- | Try to opens '' | ||
+ | Try to opens '' | ||
=== ioWrite (String) === | === ioWrite (String) === | ||
+ | |||
+ | |||
Attaches the string content to the output file | 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