pull-random-access
v1.0.1
Published
`pull-raf` is a slightly higher level api on top of [random-access-storage](https://github.com/random-access-storage/) so as to easily adapt other modules written on top of the node fs module.
Downloads
5
Readme
pull-raf
pull-raf
is a slightly higher level api on top of random-access-storage
so as to easily adapt other modules written on top of the node fs module.
example
const RAF = require('random-access-file')
const Praf = require('pull-raf')
const praf = Praf(RAF(filename))
pull(
praf.createReadStream(),
...
)
praf.append(..., cb)
api: Praf(RAF) => {read, write, stat, close, destroy, append, createReadStream}
just passes standard RAF methods through (read, write, stat, close, destroy) but adds (append, createReadStream)
praf.append(buffer, cb)
append buffer to the end of the file. throws an error if something else is already being appended.
I would merge a PR to queue appends.
praf.createReadStream(opts) => PullSource
return a pull-stream
License
MIT