I'm trying to make a file browser and I've looked around and found nothing helpful...I'm not sure how to print the files in directories using -files = fs.list("rom")- because it just returns a table and idk how to look in the whole computer for all files and directories...
any help?
[question] printing directory contents
Started by Exerro, Jun 27 2012 09:10 PM
3 replies to this topic
#1
Posted 27 June 2012 - 09:10 PM
#2
Posted 27 June 2012 - 10:22 PM
print(textutils.tabulate(fs.list(rom)))
#3
Posted 29 June 2012 - 05:40 PM
Wrong. Don't forget to use quotes around strings. It would be like so:
print( textutils.tabulate( fs.list( "/rom" ) ) )
#4
Posted 29 June 2012 - 07:57 PM
Actually, it would be just:
textutils.tabulate(fs.list("/rom"))
since tabulate prints the table contents, it doesn't return anything.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











