Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.ns.d.ts>Deno.MkdirOptions

A modern runtime for JavaScript and TypeScript.
Latest
interface Deno.MkdirOptions
import { type Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
const { MkdirOptions } = Deno;

Options which can be set when using Deno.mkdir and Deno.mkdirSync.

Properties

optional
recursive: boolean = false

If set to true, means that any intermediate directories will also be created (as with the shell command mkdir -p).

Intermediate directories are created with the same permissions.

When recursive is set to true, succeeds silently (without changing any permissions) if a directory already exists at the path, or if the path is a symlink to an existing directory.

optional
mode: number

Permissions to use when creating the directory (defaults to 0o777, before the process's umask).

Ignored on Windows.