Skip to content
Snippets Groups Projects
Commit cbfca118 authored by DarkGod's avatar DarkGod
Browse files

fs.readAll

parent fc330241
No related branches found
No related tags found
No related merge requests found
......@@ -953,6 +953,14 @@ function fs.getRealPath(path)
return p:gsub(doublesep, sep)
end
function fs.readAll(file)
local f = fs:open(file, "r")
if not f then return nil, "file not found" end
local data = f:read(10485760)
f:close()
return data
end
tstring = {}
tstring.is_tstring = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment