fs.find

From ComputerCraft
Jump to navigation Jump to search

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

Returns a table containing all files and folders that match a wildcard expansion search.

Error creating thumbnail: Unable to save thumbnail to destination
ExampleList all Lua scripts contained within a directory
Prints all files that end with .lua within /rom.
Code
for _, path in ipairs(fs.find("/rom/*.lua")) do
    print(path)
end
Output
rom/startup.lua