ReadHandle¶
ReadHandle provides methods to read a stream of data.
Methods¶
readAll¶
handle:readAll()
Read stream to the end.
Returns¶
content
: string | nil - Stream content. Returnsnil
if reached EOF.
readLine¶
handle:readLine()
Read the stream until it reaches a newline character.
Returns¶
line
: string | nil - Line content. Returnsnil
if reached EOF.
read¶
handle:read( [count] )
Read n
amount of characters.
Parameters¶
count
: number =1
- Amount of characters to read.
Returns¶
data
: string | nil - Data read.nil
if reached EOF.
close¶
handle:close()
Close the stream handle.
Last update:
March 11, 2023
Created: March 11, 2023
Created: March 11, 2023