fs.list

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

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

fs.list
Function
Syntax
fs.list(
  • path : string
)

Returns table
API fs
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.