summaryrefslogtreecommitdiffstats
path: root/lib/fs.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-07-24 20:43:15 +0000
committerTed Trask <ttrask01@yahoo.com>2008-07-24 20:43:15 +0000
commit0b933c7c8b5daf0fd62d9f9dfef973b8383250f1 (patch)
treecf1e20cc81b6c81a6bd0d91fabafcc3c5c7c316f /lib/fs.lua
parent178b4bec7aa886f08687a9518bc0f1a996fc7372 (diff)
downloadacf-core-0b933c7c8b5daf0fd62d9f9dfef973b8383250f1.tar.bz2
acf-core-0b933c7c8b5daf0fd62d9f9dfef973b8383250f1.tar.xz
Another rewrite of validator to remove dnsfiles and add a generic way for other controllers to save user-based settings. Also added fs.create_file function.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1317 ab2d0c66-481e-0410-8bed-d214d4d58bed
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)