Closed
Description
Carrying on from #415, a user can specify a start
and end
range to read from a remote file. The JSON API also allows reading n tail bytes from a file, e.g. range=-100
would be the last 100 bytes. Our API currently looks like:
file.createReadStream({ start: 0, end: 10 })
We could allow specifying a range in another way:
file.createReadStream({ range: "0-10" })
Which would open the doors for:
file.createReadStream({ range: "-100" })
Definitely open to other ideas of how we can support ranges of both types: "start and end" and "end offset".
Note: start
and end
was added to match the native fs
module's createReadStream's arguments, which behaves the same was currently as ours.