npm.io
1.0.5 • Published 9 years ago

safe-write-stream

Licence
CC0-1.0
Version
1.0.5
Deps
1
Vulns
0
Weekly
0
Stars
1

Safe Write Stream

Like fs.createWriteStream, but it will create the needed directories before trying to create the file.

Install

npm install safe-write-stream

Usage

var safeWriteStream = require('safe-write-stream');

fs.createReadStream('file.txt')
  .pipe(safeWriteStream(__dirname+'/these/will/be/created/file.txt'))
Parameters

See the fs.createWriteStream docs.

Keywords