fs.makeDir

From ComputerCraft
Jump to: navigation, search

fs.makeDir
Function
Syntax
fs.makeDir()
Returns nil
API fs
Source CC:Tweaked (source)

Creates the directory at the path path. If a file or directory at path path already exists, the function will error with File exists.

ExampleExampleCreate a directory
Creates the directory foo, checking if it exists before and after.
Code
print("Foo exists:", fs.exists("foo"))
print("Making foo")
fs.makeDir("foo")
print("Foo exists:", fs.exists("foo"))
Output
Foo exists: false
Making foo
Foo exists: true