http-random-access
This module is deprecated - its has been functionally merged with random-access-http. Please use it instead.
An implementation of random-access-storage to access content via http/s. Providing the same interface as random-access-file and random-access-memory. This implementation is intended as a drop-in replacement for random-access-file or random-access-memory in the dat-storage configuration.
Installation
npm install http-random-access --save
Basic Example
var raHttp = var file = file
API
var file = raHttp(file, options)
Open a new random access http file connection.
Options include:
url: string // The url of the dat verbose: boolean // Optional. Default: false.
file.read(offset, length, callback)
Read a buffer at a specific offset of specified length. Callback is called with the read buffer or error if there was an error.
Expects callback of the form function (err, result) {}
.
file.write(offset, buffer, callback)
Write is not implemented. This will silently fail with no data being writen.