Skip to main content

mkdirSync

function Deno.mkdirSync
allow-write
Jump to headingmkdirSync(
path: string | URL,
options?: MkdirOptions,
): void

Synchronously creates a new directory with the specified path.

Deno.mkdirSync("new_dir");
Deno.mkdirSync("nested/directories", { recursive: true });
Deno.mkdirSync("restricted_access_dir", { mode: 0o700 });

Defaults to throwing error if the directory already exists.

Requires allow-write permission.

Parameters Jump to heading

Jump to headingpath: string | URL

Return Type Jump to heading

void
Back to top