pub fn open_image<'a>(
image: impl Image + 'a,
) -> Result<Arc<Pfs<'a>>, OpenImageError>Expand description
Opens a PFS image for reading from any Image implementation.
This is used when the PFS image is behind a transformation layer (e.g.
a file within another PFS, optionally PFSC-compressed). The image is read
entirely through Image::read_at().
§Arguments
image- AnImageproviding positional read access to the PFS data
§Returns
Returns a thread-safe, reference-counted Pfs handle on success.
§Errors
Returns an OpenImageError if the image header or block structure is invalid.
§Example
use orbis_pfs::image::Image;
let pfs = orbis_pfs::open_image(image)?;
println!("Opened PFS with {} inodes", pfs.inode_count());