fs.isDir
From ComputerCraft Wiki
Revision as of 13:43, 30 November 2012 by AfterLifeLochie (Talk | contribs) (Corrected mapping from "Boolean" to "Boolean (type)")
Function fs.isDir | |
Checks whether a directory exists | |
Syntax | fs.isDir(string path) |
Returns | boolean true if path is an existing directory, or false if not (if it doesn't exist or if it is a regular file) |
Part of | ComputerCraft |
API | fs |
Examples
Example | |
Checks that the "rom" directory is, in fact, a directory | |
Code |
print(fs.isDir("rom")) |
Output | true |