mkdirSync method

void mkdirSync(
  1. Object path, [
  2. MkdirOptions? options
])

Synchronously creates a new directory with the specified path.

Deno.mkdirSync("new_dir");
Deno.mkdirSync("nested/directories", { recursive: true });
Deno.mkdirSync("restricted_access_dir", { mode: 0o700 });

Defaults to throwing error if the directory already exists.

Requires allow-write permission.

Implementation

void mkdirSync(
  _i2.Object path, [
  _i4.MkdirOptions? options,
]) {
  _i3.callMethod(
    this,
    'mkdirSync',
    [
      path,
      options ?? _i6.undefined,
    ],
  );
}