tomtrein

Untitled

Jul 3rd, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function listAll(path)
  2. local path = path or ""
  3. local tbl = fs.list(path)
  4. for k,v in pairs(path) do
  5. if fs.isDir(v) then
  6. local result = listAll(fs.combine(path,v))
  7. for k,v in pairs(result) do
  8. table.insert(tbl,fs.combine(path,v))
  9. end
  10. end
  11. end
  12. return tbl
  13. end
Advertisement
Add Comment
Please, Sign In to add comment