fs.find

From ComputerCraft Wiki
Revision as of 07:34, 28 March 2014 by Oeed (Talk | contribs) (Created fs.find page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function fs.find
Returns a list of all the files and folders that match a wildcard expansion search.
Syntax fs.find(string wildcard)
Returns table list of files and folders on the computer that matches the search term.
Part of ComputerCraft
API fs

Examples

Grid paper.png  Example
Lists all files containing 'gps' in the subfolders of the 'rom' folder.
Code
print(textutils.seralize(fs.find("/rom/*/gps")))
Output {"rom/apis/gps", "rom/help/gps", "rom/programs/gps"}