mkdir method

Future<void> mkdir(
  1. Object path, [
  2. MkdirOptions? options
])

Creates a new directory with the specified path.

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

Defaults to throwing error if the directory already exists.

Requires allow-write permission.

Implementation

_i2.Future<void> mkdir(
  _i2.Object path, [
  _i4.MkdirOptions? options,
]) =>
    _i3.promiseToFuture(_i3.callMethod(
      this,
      'mkdir',
      [
        path,
        options ?? _i6.undefined,
      ],
    ));