vfile-write
Writes a VFile and any vfiles nested in its contents. Write will also create any directories needed as well as the file. Returns a promise or callback.
Install
npm i -S vfile-write
Usage
The following script:
var write = var vfile = var file =
Will create the file structure:
one├── one.txt└── two └── two.txt
Api
write(file[, options[, callback]])
file
VFile
VFile to write.
options
?
object
Options to pass to writeFile and/or mkdir.
callback
?
function
Optional callback function. callback(error, files)
returns
a promise or callback.
write#sync(file[, options])
Synchronous version of write.
Related
License
MIT © Paul Zimmer