mkdirSync
import { mkdirSync } from "jsr:@ende/fs/unstable-mkdir";function · experimental · requires --allow-write
function mkdirSync(path: string | URL, options?: MkdirOptions): voidSynchronously creates a new directory with the specified path.
Defaults to throwing error if the directory already exists.
Requires allow-write permission.
path: string | URLThe path to the new directory.
options?: MkdirOptionsOptions for creating directories.
Example: Usage
import { mkdirSync } from "@ende/fs/unstable-mkdir";
mkdirSync("new_dir");
mkdirSync("nested/directories", { recursive: true });
mkdirSync("restricted_access_dir", { mode: 0o700 });