Function dochy_archiver::get_hash_and_metadata_from_archive [−][src]
pub fn get_hash_and_metadata_from_archive(
read: &mut impl Read
) -> ArcResult<(u128, Metadata)>
Read only the metadata of the archive file and calculate the hash
use dochy_archiver::{get_hash_and_metadata_from_dir, ArchiveOptions, ArcResult}; use std::fs::File; use dochy_archiver::get_hash_and_metadata_from_archive; fn main(){ fn2(); } fn fn2() -> ArcResult<()>{ let mut archive_file = File::open("foo/some_file")?; let (hash, metadata) = get_hash_and_metadata_from_archive(&mut archive_file)?; Ok(()) }