added a cat() function to shutil

This commit is contained in:
Izaya 2017-08-01 16:56:33 +10:00
parent 3d932ac480
commit fcaf9dff75
1 changed files with 5 additions and 0 deletions

View File

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