Difference between revisions of "Fs.isDir"
From ComputerCraft Wiki
(Corrected spelling.) |
Evil dan2wik (Talk | contribs) (Undo revision 4562 by 184.171.168.202 (talk) Changed 'rum' back to 'rom') |
||
| Line 8: | Line 8: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Checks that the " | + | |desc=Checks that the "rom" directory is, in fact, a directory |
|code=print(fs.isDir("rom")) | |code=print(fs.isDir("rom")) | ||
|output=true | |output=true | ||
Revision as of 10:37, 4 December 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 |