/// Load Rafs super block from a metadata file.
Load Rafs super block from a metadata file.
Load Rafs super block from a metadata file .
pub fn load_from_metadata(path: &str, mode: RafsMode, validate_digest: bool) -> Result<Self> {
        // open bootstrap file
        let file = OpenOptions::new().read(true).write(false).open(path)?;
        let mut rs = RafsSuper {
            mode,
            validate_digest,
            ..Default::default()
        };
        let mut reader = Box::new(file) as RafsIoReader;
        rs.load(&mut reader)?;
        Ok(rs)
    }
pub fn load_from_metadata ( path : & str , mode : RafsMode , validate_digest : bool ) -> Result < Self > { // open bootstrap file let file = OpenOptions :: new ( ) . read ( true ) . write ( false ) . open ( path ) ? ; let mut rs = RafsSuper { mode , validate_digest , .. Default :: default ( ) } ; let mut reader = Box :: new ( file ) as RafsIoReader ; rs . load ( & mut reader ) ? ; Ok ( rs ) }
Load Rafs super block from a metadata file.
Load Rafs super block from a metadata file .
path
&str
mode
RafsMode
validate_digest
bool