summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/fs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffluci/fs.lua')
-rw-r--r--src/ffluci/fs.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ffluci/fs.lua b/src/ffluci/fs.lua
index 897308c105..6e8859a0de 100644
--- a/src/ffluci/fs.lua
+++ b/src/ffluci/fs.lua
@@ -93,12 +93,13 @@ basename = posix.basename
-- dirname wrapper
dirname = posix.dirname
--- Diriterator - alias for lfs.dir - filter . and ..
+-- dir wrapper
function dir(path)
- local e = posix.dir(path)
- table.remove(e, 1)
- table.remove(e, 1)
- return e
+ local dir = {}
+ for node in posix.files(path) do
+ table.insert(dir, 1, node)
+ end
+ return dir
end
-- Alias for lfs.mkdir