From fcaf9dff755a58beca4e1d77641c867a32a16700 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Tue, 1 Aug 2017 16:56:33 +1000 Subject: [PATCH] added a cat() function to shutil --- modules/lib/shutil.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/lib/shutil.lua b/modules/lib/shutil.lua index 38e5207..6584097 100644 --- a/modules/lib/shutil.lua +++ b/modules/lib/shutil.lua @@ -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