项目作者: appgeist

项目描述 :
Utility function to ensure a directory path exists and return a Promise
高级语言: JavaScript
项目地址: git://github.com/appgeist/ensure-dir.git
创建时间: 2019-07-09T07:41:01Z
项目社区:https://github.com/appgeist/ensure-dir

开源协议:ISC License

下载


@appgeist/ensure-dir

NPM version
License

Utility function to ensure a directory path exists and return a Promise.
Uses mkdirp under the hood.

Usage

  1. const ensureDir = require("@appgeist/ensure-dir");
  2. await ensureDir("/folder/to/store/lotsa/files");

Why not mkdirp-promise?

@appgeist/ensure-dir should be slightly more efficient than mkdirp-promise because it checks whether the specified path exists before trying to create it.

License

The ISC License.