fs.exists
Returns true
if a file or directory exists at path path, otherwise returns false
.
|
|||
Creates the directory foo , checking if it exists before and after. |
|||
Code | <nowiki>
print("Foo exists:", fs.exists("foo"))
print("Making foo")
fs.makeDir("foo")
print("Foo exists:", fs.exists("foo"))
</nowiki>
|
||
Output | <nowiki>
Foo exists: false
Making foo
Foo exists: true
</nowiki>
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
fs.exists Function | |
---|---|
Syntax fs.exists(
| |
Returns | boolean |
API | fs |
Source | CC:Tweaked (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.