class ReaderWriter

Defined at line 19 of file ../../src/storage/lib/block_client/cpp/reader_writer.h

ReaderWriter provides a simple wrapper around a block device that permits reading/writing from a

device without having to worry about VMOs. It should not be used if performance is a concern and

it is *not* thread-safe.

Public Methods

zx_status_t Read (uint64_t offset, size_t count, void * buf)

Reads `count` bytes from the device at offset `offset`. Both `count` and `offset` must be

aligned to the device block size.

Defined at line 16 of file ../../src/storage/lib/block_client/cpp/reader_writer.cc

void ReaderWriter (BlockDevice & device)

Defined at line 21 of file ../../src/storage/lib/block_client/cpp/reader_writer.h

zx_status_t Read (uint64_t offset, size_t count, const zx::vmo & vmo, uint64_t vmo_offset)

Reads `count` bytes from the device at offset `offset`. Both `count` and `offset` must be

aligned to the device block size.

Defined at line 23 of file ../../src/storage/lib/block_client/cpp/reader_writer.cc

zx_status_t Write (uint64_t offset, size_t count, void * buf)

Writes `count` bytes to the device at offset `offset`. Both `count` and `offset` must be

aligned to the device block size.

Defined at line 33 of file ../../src/storage/lib/block_client/cpp/reader_writer.cc

zx_status_t Write (uint64_t offset, size_t count, const zx::vmo & vmo, uint64_t vmo_offset)

Writes `count` bytes to the device at offset `offset`. Both `count` and `offset` must be

aligned to the device block size.

Defined at line 40 of file ../../src/storage/lib/block_client/cpp/reader_writer.cc