fs.makeDir
Creates the directory at the path path. If a file or directory at path path already exists, the function will error with File exists
.
|
|||
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.makeDir Function | |
---|---|
Syntax fs.makeDir(
| |
Returns | nil |
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.