sg-file
v1.0.1
Published
File utility
Downloads
1
Readme
sg-file
File utility
Installation
$ npm install sg-file --save
Usage
'use strict'
const { saveStream } = require('sg-file')
const co = require('co')
const fs = require('fs')
co(function * () {
let stream = fs.createReadStream('foo.txt')
yield saveStream('copies/foo-copy.txt', stream)
}).catch((err) => console.error(err))
Functions
Available functions
| Signature | Description |
| ---- | ----------- |
| saveStream(filename, stream, options) -> Promise
| Save stream into file |
License
This software is released under the Apache-2.0 License.