file.readlines
This commit is contained in:
parent
1f3cf5ed53
commit
8054d4ba55
@ -276,6 +276,15 @@ function table.tostring(t)
|
||||
return s..']'
|
||||
end
|
||||
|
||||
function file.readlines(path)
|
||||
local str = file.read(path)
|
||||
local lines = {}
|
||||
for s in str:gmatch("[^\r\n]+") do
|
||||
table.insert(lines, s)
|
||||
end
|
||||
return lines
|
||||
end
|
||||
|
||||
-- Deprecated functions
|
||||
block_index = block.index
|
||||
block_name = block.name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user