make-dir

  • Version 3.1.0
  • Published
  • 10 kB
  • 1 dependency
  • MIT license

Install

npm i make-dir
yarn add make-dir
pnpm add make-dir

Overview

Make a directory and its parents if needed - Think `mkdir -p`

Index

Variables

Interfaces

Variables

variable makeDir

const makeDir: {
(path: string, options?: makeDir.Options): Promise<string>;
sync(path: string, options?: makeDir.Options): string;
};

    Interfaces

    interface Options

    interface Options {}

      property fs

      readonly fs?: typeof fs;
      • Use a custom fs implementation. For example [graceful-fs](https://github.com/isaacs/node-graceful-fs).

        Using a custom fs implementation will block the use of the native recursive option if fs.mkdir or fs.mkdirSync is not the native function.

        require('fs')

      property mode

      readonly mode?: number;
      • Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/).

        0o777

      Package Files (1)

      Dependencies (1)

      Dev Dependencies (10)

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/make-dir.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/make-dir)
      • HTML
        <a href="https://www.jsdocs.io/package/make-dir"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>