Difference between revisions of "Fs.makeDir"

From ComputerCraft Wiki
Jump to: navigation, search
m (Moved to CAT:LuaCoreFunctions)
(Copy description from API page and use type template)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=fs.makeDir
 
|name=fs.makeDir
|args=[[string (type)|string]] path
+
|args={{Type|string}} path
 
|api=fs
 
|api=fs
|desc=Creates a directory (fails if the location already exists as a file; silently does nothing if the location or a parent already exists as a directory; recursively creates directories if a parent is also missing)
+
|desc=Makes a directory. If the location is already a directory, this function silently does nothing. If any parent path components are missing, they are also created. If the target location or any parent exists and is a file (instead of a directory), the operation fails.
 
|examples=
 
|examples=
 
{{Example
 
{{Example

Latest revision as of 19:43, 22 April 2013


Grid Redstone.png  Function fs.makeDir
Makes a directory. If the location is already a directory, this function silently does nothing. If any parent path components are missing, they are also created. If the target location or any parent exists and is a file (instead of a directory), the operation fails.
Syntax fs.makeDir(string path)
Returns nil
Part of ComputerCraft
API fs

Examples

Grid paper.png  Example
Create a directory called "efgh" inside a directory called "abcd" ("abcd" need not exist; it will be created)
Code
fs.makeDir("abcd/efgh")