BarecatReadOnlyFileObject#
- class barecat.io.fileobj.BarecatReadOnlyFileObject(shard_file, start, size)[source]#
Bases:
BarecatFileObjectFile-like object representing a section of a file.
Properties#
Size of the section in bytes. |
Instance Methods#
|
Read a from the section, starting from the current position. |
|
Read bytes into a buffer from the section, starting from the current position. |
|
Read all remaining bytes from the section. |
|
Always returns True, since the section is always readable. |
|
Always returns True, since the section is always seekable. |
|
Send bytes from the section to a file descriptor. |
|
Always returns False, since the section is read-only. |
|
Truncate file to size bytes. |
|
Read and return a line from the stream. |
|
Return current stream position. |
|
Change stream position. |
|
Mark as closed. The underlying shard file is not closed (we don't own it). |