diff options
author | Steven Barth <steven@midlink.org> | 2008-03-22 21:26:44 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-22 21:26:44 +0000 |
commit | ef01ff75db17f23a90757cf473778cfefe1ad120 (patch) | |
tree | 954eaecffa563e1d97da7ed4288e65254ee46041 /src/ffluci/fs.lua | |
parent | 93c55f3c5d7d253423c9d5695b8d71388bd21988 (diff) |
* CBI updates
Diffstat (limited to 'src/ffluci/fs.lua')
-rw-r--r-- | src/ffluci/fs.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ffluci/fs.lua b/src/ffluci/fs.lua index 55da9b8dce..fb9a9c1c95 100644 --- a/src/ffluci/fs.lua +++ b/src/ffluci/fs.lua @@ -28,6 +28,13 @@ module("ffluci.fs", package.seeall) require("lfs") +-- Checks whether a file exists +function isfile(filename) + local fp = io.open(path, "r") + if file then file:close() end + return file ~= nil +end + -- Returns the content of file function readfile(filename) local fp = io.open(filename) |