kolya5544

Revelation 2.0

Jul 12th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.02 KB | None | 0 0
  1. function scandir(directory)
  2.     local i, t, popen = 0, {}, io.popen
  3.     local pfile = popen('ls -aR "'..directory..'"')
  4.     for filename in pfile:lines() do
  5.         if string.match(filename, ":")~=true then
  6.             i = i + 1
  7.             t[i] = filename
  8.         end
  9.     end
  10.     pfile:close()
  11.     return t
  12. end
  13. print("DO NOT STOP THE PROGRAM OR YOUR PC!")
  14. local first = scandir("/home")
  15. for k, v in next,first do
  16.     print(k..' '..v)
  17. end
Add Comment
Please, Sign In to add comment