empty-file
A Node module to write an empty file asynchronously
const emptyFile = ;const fs = ; ;
Installation
npm install empty-file
API
const emptyFile = ;
emptyFile(filePath[, options])
filePath: String
options: Object
(fs.writeFile
options except for encoding
)
Return: Object
(Promise instance)
It writes new Buffer(0)
to a file.
When it finish writing a file, it will be fulfilled with no arguments.
When it fails, it will be rejected with an error object.
const emptyFile = ;const fs = ; { fs; //=> '' fsmode; //=> 33261} { console;} ;
Related project
- empty-file-callback (callback-style version)