fs.list

From ComputerCraft
Jump to: navigation, search

fs.list
Function
Syntax
fs.list()
Returns table
API fs
Source CC:Tweaked (source)

Returns a table of all the files/directories in the directory at the path path.

ExampleExampleList files in a directory
Gets the list of files in the root directory (/) and prints them
Code
for _, name in pairs(fs.list("/")) do
    print(name)
end
Output
rom
test.lua