read_file_range

Function read_file_range 

Source
pub fn read_file_range<T>(
    image: T,
    path: &str,
    offset: u64,
    len: usize,
) -> Result<Vec<u8>>
where T: Read + Write + Seek,
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.