Skip to main content

create_fs_from_bytestream

Function create_fs_from_bytestream 

Source
pub fn create_fs_from_bytestream(
    disk_img_data: &Vec<u8>,
    maybe_ext: Option<&str>,
    maybe_fmt: Option<&DiskFormat>,
) -> Result<Box<dyn DiskFS>, Box<dyn Error>>
Expand description

Given a bytestream return a DiskFS, or Err if the bytestream cannot be interpreted. Optional maybe_ext restricts the image types that will be tried based on file extension. Optional maybe_fmt can be used to specify a proprietary format (if None standard formats will be tried).