luerl_io (luerl v1.5.1)
View SourceThis module provides a standard of set io functions for Luerl. In the
following description, many functions have an optional parameter
IoDevice. If included, it must be the pid of a process which handles
the IO protocols such as the IoDevice returned by file:open/2. Also
in the functions handling files it can also be the name of the file
which will then be opened.
Note that Luerl, following Lua, does do any implicit UTF-8 encoding of input strings.
Summary
Functions
Equivalent to get_line(standard_io, '').
Equivalent to get_line(standard_io, Prompt).
Read a line of text from IoDevice withe the prompt Prompt. We make
sure that anu UTF-8 encoding is done before we return the data.
Equivalent to parse_file(FileName, 1).
Parse the file FileName and return the chunk in it. FileName can
also be an IoDevice of an already opened file.
Equivalent to scan_file(FileName, 1).
Scan the file FileName and return the tokens in it. FileName can
also be an IoDevice of an already opened file.
Functions
Equivalent to get_line(standard_io, '').
Equivalent to get_line(standard_io, Prompt).
Read a line of text from IoDevice withe the prompt Prompt. We make
sure that anu UTF-8 encoding is done before we return the data.
Equivalent to parse_file(FileName, 1).
Parse the file FileName and return the chunk in it. FileName can
also be an IoDevice of an already opened file.
Equivalent to scan_file(FileName, 1).
Scan the file FileName and return the tokens in it. FileName can
also be an IoDevice of an already opened file.