add reading single file into one string (used for importing json)

master
ademant 2019-07-15 12:16:05 +02:00
parent b0507dd1fa
commit d8186e150d
1 changed files with 12 additions and 0 deletions

View File

@ -127,3 +127,15 @@ basic_functions.import_settingtype = function(infile)
end
end
end
basic_functions.read_file=function(filename)
local file=io.open(filename,"r")
out=""
if file then
for line in file:lines() do
out=out..line
end
file.close()
end
return(out)
end