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.
Carrying on from #415, a user can specify a
startandendrange to read from a remote file. The JSON API also allows reading n tail bytes from a file, e.g.range=-100would be the last 100 bytes. Our API currently looks like:We could allow specifying a range in another way:
Which would open the doors for:
Definitely open to other ideas of how we can support ranges of both types: "start and end" and "end offset".
Note:
startandendwas added to match the nativefsmodule's createReadStream's arguments, which behaves the same was currently as ours.