mirror of https://github.com/lcpz/lain.git
#25 fix attempt 2
This commit is contained in:
parent
3b724efc81
commit
804a3b4084
|
@ -35,12 +35,11 @@ end
|
||||||
|
|
||||||
-- see if the file exists
|
-- see if the file exists
|
||||||
function helpers.file_exists(file)
|
function helpers.file_exists(file)
|
||||||
local f = io.open(file, "rb")
|
local f = io.open(file)
|
||||||
if f then f:close() end
|
if f then f:close() end
|
||||||
return f ~= nil
|
return f ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- get all lines from a file, returns an empty
|
-- get all lines from a file, returns an empty
|
||||||
-- list/table if the file does not exist
|
-- list/table if the file does not exist
|
||||||
function helpers.lines_from(file)
|
function helpers.lines_from(file)
|
||||||
|
|
Loading…
Reference in New Issue