apfs::BlockReader¶
-
class BlockReader¶
NOTE: If you’re using the public API, you will never actually have to use this directly yourself! A utility class that reads raw memory from blocks in chunks of
BLOCK_SIZE.Public Functions¶
-
bytes_t read_blocks(uint64_t block_num, uint64_t num_blocks) const¶
Read some blocks and return their raw bytes.
-
template<typename T>
inline T read_object(uint64_t block_num) const¶ Read an APFS object (that begins with
obj_phys_t) from a given block, verify its checksum, and return it.
-
template<typename T>
inline T read_struct(uint64_t block_num) const¶ Read any object from a given block and return it.
Does not verify any checksums, this is just a reinterpret cast.
-
template<typename KeyType, typename Compare = std::less<KeyType>>
BTree<KeyType, Compare> read_btree(uint64_t block_num) const¶ Reads an
btree_node_phys_tand calls the constructor for BTree<KeyType>This is for when operator< is defined
-
template<typename KeyType, typename Compare>
BTree<KeyType, Compare> read_btree(uint64_t block_num, Compare lt) const¶ Reads an
btree_node_phys_tand calls the constructor for BTree<KeyType>This is for when we must pass a comparator
-
bytes_t read_blocks(uint64_t block_num, uint64_t num_blocks) const¶