Difference between revisions of "Fs.isDir"
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 directory, or <var>false</var> if not (if it doesn't exist or if it is a regular file) | + | |returns=[[boolean_(type)|boolean]] <code>true</code> if <var>path</var> is an existing directory, or <var>false</var> if not (if it doesn't exist or if it is a regular file) |
|desc=Checks whether a directory exists | |desc=Checks whether a directory exists | ||
|examples= | |examples= | ||
Revision as of 13:43, 30 November 2012
| 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
| Checks that the "rom" directory is, in fact, a directory | |
| Code |
print(fs.isDir("rom"))
|
| Output | true |