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

x/deno/cli/js/mkdir.ts>mkdirSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function mkdirSync
import { mkdirSync } from "https://deno.land/x/deno@v0.28.0/cli/js/mkdir.ts";

Creates a new directory with the specified path synchronously. If recursive is set to true, nested directories will be created (also known as "mkdir -p"). mode sets permission bits (before umask) on UNIX and does nothing on Windows.

  Deno.mkdirSync("new_dir");
  Deno.mkdirSync("nested/directories", true);

Parameters

path: string
optional
recursive = [UNSUPPORTED]
optional
mode = [UNSUPPORTED]