Difference between revisions of "Fs.exists"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
m (Corrected mapping from "Boolean" to "Boolean (type)") |
||
| Line 4: | Line 4: | ||
|args=[[string (type)|string]] path | |args=[[string (type)|string]] path | ||
|api=fs | |api=fs | ||
| − | |returns=[[boolean]] <code>true</code> if <var>path</var> is an existing file or directory, or <var>false</var> if not | + | |returns=[[boolean_(type)|boolean]] <code>true</code> if <var>path</var> is an existing file or directory, or <var>false</var> if not |
|desc=Checks whether a file or directory exists | |desc=Checks whether a file or directory exists | ||
|examples= | |examples= | ||
Revision as of 13:43, 30 November 2012
| Checks whether a file or directory exists | |
| Syntax | fs.exists(string path) |
| Returns | boolean true if path is an existing file or directory, or false if not |
| Part of | ComputerCraft |
| API | fs |
Examples
| Checks that the "rom" directory exists | |
| Code |
print(fs.exists("rom"))
|
| Output | true |