Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 477 Bytes

README.md

File metadata and controls

23 lines (14 loc) · 477 Bytes

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 createOutputStream = require('create-output-stream')

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

License

MIT