Skip to main content

mkdir

function Deno.mkdir
allow-write
Jump to headingmkdir(
path: string | URL,
options?: MkdirOptions,
): Promise<void>

Creates a new directory with the specified path.

await Deno.mkdir("new_dir");
await Deno.mkdir("nested/directories", { recursive: true });
await Deno.mkdir("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

Promise<void>
Back to top