The CBFSVaultStream type is returned by some of the CBVault class's methods. All stream types in CBFS Vault share a common API, inherited from Python's io.RawIOBase class, documented below.
Note that, for brevity, many of the members offered by io.RawIOBase are not documented here; please refer to the Python documentation for more information.
Gets the length of the stream, in bytes.
Whether the stream supports reading.
Whether the stream supports seeking.
Gets the current position within the stream.
Whether the stream supports writing.
Flushes and closes the stream. Has no effect if the stream is already closed.
Forces all data held by the stream's buffers to be written out to storage.
Reads a specified number of bytes from the stream and returns them, advancing the current position within the stream by the number of bytes read.
Up to n bytes will be read from the stream and returned. If n is unspecified or -1, all bytes are read. Fewer than n bytes may be returned if fewer than n bytes are read.
Reads and returns all bytes available in the stream from the current position onwards.
Reads a sequence of bytes from the stream and advances the current position within the stream by the number of bytes read.
Up to len(b) bytes are read into b, and the number of bytes read is returned. The object b should be a pre-allocated, writable array of bytes, either bytearray or a writable memoryview.
Sets the current position within the stream based on a particular point of origin.
offset specifies the offset in the stream to seek to, relative to whence, which must be either SEEK_SET, SEEK_CUR, or SEEK_END (or a corresponding integer value) as described by the io.IOBase.seek documentation.
Returns the new position within the stream.
Sets the length of the current stream.
Resizes the current stream to size bytes (or to the current position if size is None).
Returns the new size of the stream.
Writes a sequence of bytes to the stream and advances the current position within the stream by the number of bytes written.
The bytes in b are written to the stream, and the number of bytes written in returned. The object b should be an array of bytes, either bytes, bytearray, or memoryview.