ensureDir

Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

Ensure that the passed directory exists. If not, will be created recursively… (async)

Params

  1. dir*-String

    The directory to ensure that it exists…

Return

  1. -Promise

    A promise that will be resolved once the directory has been created if needed…

Example

import { ensureDir } from '@blackbyte/sugar/fs';
 ensureDir('my/cool/dir').then(() => {
   // do something...
});

Todo

  • testsnormal