Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- cDir = ""
- --Controllo la cartella richiesta
- if args[1] == nil then
- cDir = shell.dir()
- else
- if fs.isDir(args[1]) then
- cDir = shell.resolve(args[1])
- else
- print("Cartella non trovata")
- return
- end
- end
- dirs = {}
- files = {}
- --Printo tutti i file e cartelle che ci sono
- for i, k in pairs(fs.list(cDir)) do
- if fs.isDir(cDir.."/"..k) then
- table.insert(dirs, k)
- else
- table.insert(files, k)
- end
- end
- textutils.pagedTabulate(colors.blue, dirs, colors.red, files)
Advertisement
Add Comment
Please, Sign In to add comment