mkdir
Method: fs.mkdir
Asynchronously creates a directory.
The optional options
argument can be an integer specifying mode (permission and sticky bits), or an object with a mode
property and a recursive
property indicating whether parent directories should be created. Calling mkdir when path is a directory that exists results in a rejection only when recursive
is false
.
Return
Upon success, fulfills with undefined
if recursive
is false
, or the first directory path created if recursive
is true
.
Parameters
The path to the directory to create.
Method: fs.mkdir
Asynchronously creates a directory.
The optional options argument can be an integer specifying mode (permission and sticky bits), or an object with a mode
property and a recursive
property indicating whether parent directories should be created. Calling mkdir when path is a directory that exists results in a rejection only when recursive
is false
.
Return
Upon success, fulfills with undefined
if recursive
is false
, or the first directory path created if recursive
is true
.
Parameters
The path to the directory to create.
The options to use for the directory creation operation.