pub fn read_blobs(&self) -> Result<Vec<Blob>> {
        let mut blobs = vec![];
        for file in std::fs::read_dir(self.directory.path())? {
            let file = file?;
            let merkle = file
                .file_name()
                .into_string()
                .map_err(|name| anyhow!("Invalid filename {:?}", name))?;
            let buffer = std::fs::read(file.path())?;
            blobs.push(Blob { merkle, buffer });
        }
        Ok(blobs)
    }
/// Reads all blobs from blobfs.
Reads all blobs from blobfs.
Reads all blobs from blobfs .
pub fn read_blobs(&self) -> Result<Vec<Blob>> {
        let mut blobs = vec![];
        for file in std::fs::read_dir(self.directory.path())? {
            let file = file?;
            let merkle = file
                .file_name()
                .into_string()
                .map_err(|name| anyhow!("Invalid filename {:?}", name))?;
            let buffer = std::fs::read(file.path())?;
            blobs.push(Blob { merkle, buffer });
        }
        Ok(blobs)
    }
pub fn read_blobs ( & self ) -> Result < Vec < Blob > > { let mut blobs = vec ! [ ] ; for file in std :: fs :: read_dir ( self . directory . path ( ) ) ? { let file = file ? ; let merkle = file . file_name ( ) . into_string ( ) . map_err ( | name | anyhow ! ( " " name ) ) ? ; let buffer = std :: fs :: read ( file . path ( ) ) ? ; blobs . push ( Blob { merkle , buffer } ) ; } Ok ( blobs ) }
Reads all blobs from blobfs.
Reads all blobs from blobfs .
&self
&self