Difference between revisions of "Fs.list"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{Function |name=fs.list |args=string path |api=fs |examples= {{Example |desc=Displays a list of all files and folders in the root directory of a computer |c...")
 
Line 3: Line 3:
 
|args=[[string (type)|string]] path
 
|args=[[string (type)|string]] path
 
|api=fs
 
|api=fs
 +
|returns=[[table (type)|table]] list of files and folders in that path
 
|examples=
 
|examples=
 
{{Example
 
{{Example

Revision as of 21:30, 26 February 2012

Grid Redstone.png  Function fs.list
No description provided.
Syntax fs.list(string path)
Returns table list of files and folders in that path
Part of ComputerCraft
API fs

Examples

Grid paper.png  Example
Displays a list of all files and folders in the root directory of a computer
Code
for k,v in ipairs(fs.list("/")) do
 print(v)
end
Output A list of all files and folders in /