Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function listAll(path)
- local path = path or ""
- local tbl = fs.list(path)
- for k,v in pairs(path) do
- if fs.isDir(v) then
- local result = listAll(fs.combine(path,v))
- for k,v in pairs(result) do
- table.insert(tbl,fs.combine(path,v))
- end
- end
- end
- return tbl
- end
Advertisement
Add Comment
Please, Sign In to add comment