Skip to main content

read_all

Function read_all 

Source
pub fn read_all(
    dev: &dyn BlockDevice,
    inode: &Inode,
    inode_raw: &[u8],
    inode_size: u16,
    block_size: u32,
) -> Result<Vec<u8>>
Expand description

Read the contents of an inline-data file in full.

Returns the concatenation of:

  1. inode.block (60 bytes), truncated to the file’s size
  2. The system.data xattr value (if file size > 60)

Caller must verify the inode actually has INLINE_DATA_FL set before calling — otherwise the returned bytes are garbage (extent header etc.).