Repository navigation
Allow reading only n tail bytes from a file #420
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.triage meI really want to be triaged.I really want to be triaged.
Milestone
Description
Activity
- addedapi: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
on Mar 3, 2015 - changed the title
[-]Allow readonly only n tail bytes from a file[/-][+]Allow reading only n tail bytes from a file[/+]on Mar 3, 2015 Another idea I'm not too attached to but figured I'd throw it out. What about:
file.createReadStream({ tail: 10 })
This would override or be always overridden by
start/end. Problems include introducing another parameter, parameters that void other parameters, but benefits are it's clear in its purpose.How about just allowing:
file.createReadStream({ end: -10 })
and adding documentation to explain that's reading -10 tail bytes?
I'm 👍 to
end: -10(the same way in CSS you can doright: -10pxfor example). Definitely would rather this than adding a new parameter... But you guys are the experts.Cool cool. Let's try it out and if we find the community hates it, we can try again!
- addedtriage meI really want to be triaged.I really want to be triaged.🚨This issue needs some love.This issue needs some love.
on Apr 6, 2020 - added 2 commits that reference this issue
on Sep 15, 2022 26 remaining items
- added a commit that references this issue
on Jan 28, 2026 - added a commit that references this issue
on Jan 28, 2026 - added a commit that references this issue
on Feb 2, 2026 - added a commit that references this issue
on Feb 3, 2026 - added a commit that references this issue
on Feb 3, 2026 - added a commit that references this issue
on Feb 5, 2026 - added a commit that references this issue
on Feb 17, 2026 - added 2 commits that reference this issue
on Feb 26, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.triage meI really want to be triaged.I really want to be triaged.
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.