Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- function fb()
- print("directory:",dir)
- print("type a command")
- cmd = read()
- if cmd == "cd" then
- print("enter a directory to go to")
- ed = read()
- if not fs.exists(ed) then
- print("directory not found")
- fb()
- end
- dir = ed
- fb()
- else if cmd == "ls" then
- ls = fs.list(dir)
- print(ls)
- fb()
- else if cmd == "exit" then
- os.reboot()
- end
- end
- end
- end
- dir = "LUAOS/C/"
- fb()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement