Difference between revisions of "Fs.exists"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m |
MKlegoman357 (Talk | contribs) |
||
Line 4: | Line 4: | ||
|args={{Type|string}} path | |args={{Type|string}} path | ||
|api=fs | |api=fs | ||
− | |returns={{Type|boolean}} does the file or folder | + | |returns={{Type|boolean}} does the file or folder exist? |
|desc=Checks if a path refers to an existing file or directory. | |desc=Checks if a path refers to an existing file or directory. | ||
|examples= | |examples= |
Latest revision as of 16:25, 10 April 2014
Function fs.exists | |
Checks if a path refers to an existing file or directory. | |
Syntax | fs.exists(string path) |
Returns | boolean does the file or folder exist? |
Part of | ComputerCraft |
API | fs |
Examples
Example | |
Checks that the "rom" directory exists. | |
Code |
print(fs.exists("rom")) |
Output | true |