added a cat() function to shutil

This commit is contained in:
Izaya 2017-08-01 16:56:33 +10:00
parent 3d932ac480
commit fcaf9dff75

View File

@ -4,3 +4,8 @@ mkdir=fs.mkdir
function ls(p) function ls(p)
for k,v in ipairs(fs.list(p)) do print(v) end for k,v in ipairs(fs.list(p)) do print(v) end
end end
function cat(p)
local f=io.open(p)
print(f:read("*a"))
f:close()
end