1.1.0 • Published 7 years ago

fd-read-stream v1.1.0

Weekly downloads
281
License
MIT
Repository
github
Last release
7 years ago

fd-read-stream

Readable stream that reads from a file descriptor. Supports tailing and retries.

npm install fd-read-stream

Usage

var fs = require('fs')
var createReadStream = require('fd-read-stream')

var rs = createReadStream(fs.openSync('some-file', 'r'))

rs.pipe(process.stdout)

API

var rs = createReadStream(fd, [options])

Create a new readable stream. Options include:

{
  tail: false // keep reading the fd forever (will pool it)
  retry: 0 // wait this many ms and retry a read once if it fails
}

License

MIT