Difference between revisions of "Fs.list"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
|||
Line 15: | Line 15: | ||
end --End the loop | end --End the loop | ||
− | |output=A list of all files and folders in the root directory as a table. Note that fs.list() could also be inserted directly into ipairs() or pairs() | + | |output=A list of all files and folders in the root directory as a table. Note that fs.list() could also be inserted directly into ipairs() or pairs(). Using pairs would list hidden files as ipairs would not. |
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Revision as of 17:59, 2 December 2012
Function fs.list | |
Returns a list of all the files contained in a directory, in table format | |
Syntax | fs.list(string path) |
Returns | table list of files and folders in path, which must be a directory |
Part of | ComputerCraft |
API | fs |