diff options
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) |