Closed bjornbytes closed 1 year ago
I've also been thinking about adding Archive
objects, for reading (and potentially writing) of archives like zip/tar. It's interesting to think about how File objects (and seeking) interacts with archives.
Other considerations after thinking about it more:
pread
/pwrite
portable enough for us? Also the windows support with IO completion ports or w/e.string.sub
. Is the offset param worth it compared to the existing solution?Args on .read/.write get too messy/inconsistent. I think this should be implemented as File
objects. This isn't immediately planned though.
File object was added in #721
It's important to be able to read a range of bytes from a file. There are 2 ways this could be accomplished:
offset
parameter tolovr.filesystem.read
. This could also get added to.write
.File
objects like LÖVE, which would support seeking and reduce overhead of consecutive random reads from the same file.