pub fn read_file_range<T>(
image: T,
path: &str,
offset: u64,
len: usize,
) -> Result<Vec<u8>>
Expand description
Read a slice of the file at path
starting at byte offset
.
Returns up to len
bytes. If the file is smaller than offset + len
,
the returned buffer will contain all available bytes from offset
to end.