import { mkdir } from "https://deno.land/x/ayonli_jsext@v0.9.72/fs.ts";
Creates a new directory with the given path.
Examples
Example 1
Example 1
// with the default storage
import { mkdir } from "@ayonli/jsext/fs";
await mkdir("/path/to/dir");
Example 2
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
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
optional
options: MkdirOptions = [UNSUPPORTED]