ensureFile

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

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

Params

  1. filePath*-String

    The file to ensure that it exists…

Return

  1. -Promise

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

Example

import { ensureFile } from '@blackbyte/sugar/fs';
await ensureFile('my/cool/file.jpg').then(() => {
   // do something...
});

Todo

  • testsnormal