summaryrefslogtreecommitdiffstats
path: root/lib/fs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fs.lua')
-rw-r--r--lib/fs.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/fs.lua b/lib/fs.lua
index 7b60591..31e8f13 100644
--- a/lib/fs.lua
+++ b/lib/fs.lua
@@ -23,7 +23,14 @@ function is_link ( pathstr )
end
-
+-- Creates a blank file
+function create_file ( path )
+ local cmd = "touch "..path
+ local f = io.popen(cmd)
+ f:close()
+ return is_file(path)
+end
+
-- Returns the contents of a file as a string
function read_file ( path )
local file = io.open(path)