Luart
Comprehensive Windows framework to develop in Lua
modules > sys > File > lines

File.lines readonly property iterable



The File.lines iterator returns the next line in the File with each loop iteration. File should have been opened before in "read" mode. The line omits the leading end of line character marker.

Example


local file = sys.File("examples\\notepad.wlua")
	
file:open()
for line in file.lines do
	print(line)
end