readinto#
- barecat.Barecat.readinto(item, buffer, offset=0)[source]#
Read a file into a buffer, starting from an offset within the file.
Read until either the buffer is full, or the end of the file is reached.
- Parameters:
item (Union[BarecatFileInfo, str]) – Either a BarecatFileInfo object, or a path to a file within the archive.
buffer – Destination buffer to read the file into.
offset – Offset within the file to start reading from.
- Returns:
Number of bytes read.
- Return type: