shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
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
- filePath*-String
The file to ensure that it exists…
Return
- -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
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space