mkdir
function mkdir(path, options?): Promise<void>;
Make a directory.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| Directory path. |
| (Optional) Options when create directory, by default is |
Returns
Promise<void>
It resolves to nothing.
Throws
Throws TypeError if any parameter is invalid. Or throws Error if failed to create hard mkdir from the file.
Example
try {
await Rsvim.fs.mkdir(".rsvim");
Rsvim.cmd.echo(`Created directory ".rsvim"`);
} catch (e) {
Rsvim.cmd.echo(`Failed to create directory ".rsvim": ${e}`);
}