(File):lines

Iterate over all the lines in a file.

Function

Synopsis

iterator = File:lines( )

Arguments

None.

Returns

function iterator
The iterator (can be used in for loops).

Notes

If the EOF (end of file) is reached during iteration, the File will be automatically closed.

See Also


Other Languages