diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-07-24 20:43:15 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-07-24 20:43:15 +0000 |
commit | 0b933c7c8b5daf0fd62d9f9dfef973b8383250f1 (patch) | |
tree | cf1e20cc81b6c81a6bd0d91fabafcc3c5c7c316f /lib/fs.lua | |
parent | 178b4bec7aa886f08687a9518bc0f1a996fc7372 (diff) | |
download | acf-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.lua | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) |