Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scandir(directory)
- local i, t, popen = 0, {}, io.popen
- local pfile = popen('ls -aR "'..directory..'"')
- for filename in pfile:lines() do
- if string.match(filename, ":")~=true then
- i = i + 1
- t[i] = filename
- end
- end
- pfile:close()
- return t
- end
- print("DO NOT STOP THE PROGRAM OR YOUR PC!")
- local first = scandir("/home")
- for k, v in next,first do
- print(k..' '..v)
- end
Add Comment
Please, Sign In to add comment