create-output-stream

Create an fs.writeableStream that won't error if the directory does not exist.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
create-output-stream
400.0.17 years ago7 years agoMinified + gzip package size for create-output-stream in KB

Readme

Node.js: createOutputStream
Exactly like fs.createWriteStream, but if the directory does not exist, it's created. Extracted from fs-extra

Install

npm i --save create-output-stream

Example

var fs = require('fs-extra')

// if /tmp/some does not exist, it is created
var ws = fs.createOutputStream('/tmp/some/file.txt')
ws.write('hello\n')

License

MIT