Skip to content

createDirectory

Requires a Node.js runtime ('qsu/node')

Creates a directory with the specified path. Ignores the operation if the directory already exists.

If a file already sits at the path, the error is reported rather than swallowed: nothing usable as a directory was created, so answering "already there" would be a lie.

Parameters

NameTypeRequiredDefault
filePathstringStringstr
File or directory path
recursivenamedkeywordbooleanbooltrueTrue
Recursively creates all directories in the given path.

namedThese parameters are passed as named parameters.

keywordThese parameters are passed as keyword arguments, or as a single dict in their place.

Returns

Promise<void>

Future<void>

None

Examples

javascript
createDirectory('/home/user/a/b/c');
dart
createDirectory('/home/user/a/b/c');
python
createDirectory('/home/user/a/b/c')

Released under the MIT License