file:lines ()

Returns an iterator function that, each time it is called, returns a new line from the file. Therefore, the construction

     for line in file:lines() do body end

will iterate over all lines of the file. (Unlike io.lines, this function does not close the file when the loop ends.)

EVERYTHING
Input and Output Facilities
file:close
file:flush
file:lines
file:read
file:seek
file:setvbuf
file:write
io.close
io.flush
io.input
io.lines
io.open
io.output
io.popen
io.read
io.tmpfile
io.type
io.write

[ ? | | @ ]