file:lines (ยทยทยท)
Returns an iterator function that, each time it is called, reads the file according to the given formats. When no format is given, uses "l
" as a default. As an example, the construction
for c in file:lines(1) do body end
will iterate over all characters of the file, starting at the current position. Unlike io.lines
, this function does not close the file when the loop ends.
In case of errors this function raises the error, instead of returning an error code.
Please login to continue.