Difference between revisions of "Fs.isDir"
From ComputerCraft Wiki
Evil dan2wik (Talk | contribs) (Undo revision 4562 by 184.171.168.202 (talk) Changed 'rum' back to 'rom') |
(Copy description from API page, fix return formatting, and use type template) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=fs.isDir | |name=fs.isDir | ||
− | |args= | + | |args={{Type|string}} path |
|api=fs | |api=fs | ||
− | |returns= | + | |returns={{Type|boolean}} <code>true</code> if <var>path</var> is an existing directory, or <code>false</code> if not (if it doesn't exist or if it is a regular file) |
− | |desc=Checks | + | |desc=Checks if a path refers to an existing directory. |
|examples= | |examples= | ||
{{Example | {{Example |
Latest revision as of 19:43, 22 April 2013
Function fs.isDir | |
Checks if a path refers to an existing directory. | |
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 |