fs.list
Returns a table of all the files/directories in the directory at the path path.
|
|||
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>
|
||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fs.list Function | |
|---|---|
|
Syntax fs.list(
| |
| 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.