1.0.1 • Published 6 years ago

pull-random-access v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

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

1.0.1

6 years ago

1.0.0

6 years ago