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

x/ayonli_jsext/esm/fs.js>mkdir

A JavaScript extension package for building strong and modern applications.
Latest
function mkdir
import { mkdir } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/fs.js";

Creates a new directory with the given path.

Examples

Example 1

// with the default storage
import { mkdir } from "@ayonli/jsext/fs";

await mkdir("/path/to/dir");

Example 2

// with a user-selected directory as root (Chromium only)
import { mkdir } from "@ayonli/jsext/fs";

const root = await window.showDirectoryPicker();
await mkdir("/path/to/dir", { root });

Example 3

// create the directory and its parent directories if not exist
import { mkdir } from "@ayonli/jsext/fs";

await mkdir("/path/to/dir", { recursive: true });

Parameters

path
optional
options = [UNSUPPORTED]