Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pull-random-access

dominictarr5MIT1.0.1

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.

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