summaryrefslogtreecommitdiff
path: root/server/src/async/scanfiles.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/async/scanfiles.lua')
-rw-r--r--server/src/async/scanfiles.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/async/scanfiles.lua b/server/src/async/scanfiles.lua
new file mode 100644
index 00000000..900cc0a8
--- /dev/null
+++ b/server/src/async/scanfiles.lua
@@ -0,0 +1,17 @@
+local root = ...
+
+require 'utility'
+local fs = require 'bee.filesystem'
+local list = {}
+local ignore = {
+ ['.git'] = true,
+ ['node_modules'] = true,
+}
+
+for path in io.scan(fs.path(root), ignore) do
+ if path:extension():string() == '.lua' then
+ list[#list+1] = path:string()
+ end
+end
+
+OUT:push(list)