fs.exists
From ComputerCraft Wiki
Revision as of 13:43, 30 November 2012 by AfterLifeLochie (Talk | contribs) (Corrected mapping from "Boolean" to "Boolean (type)")
| 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 |