pub fn list_archive(reader: Box<dyn Read>) -> crate::Result<Vec<FileInArchive>> {
    let mut archive = tar::Archive::new(reader);

    let mut files = vec![];
    for file in archive.entries()? {
        let file = file?;

        let path = file.path()?.into_owned();
        let is_dir = file.header().entry_type().is_dir();

        files.push(FileInArchive { path, is_dir });
    }

    Ok(files)
}
/// List contents of `archive`, returning a vector of archive entries
List contents of `archive`, returning a vector of archive entries
List contents of ` archive ` returning a vector of archive entries
pub fn list_archive(reader: Box<dyn Read>) -> crate::Result<Vec<FileInArchive>> {
    let mut archive = tar::Archive::new(reader);
    let mut files = vec![];
    for file in archive.entries()? {
        let file = file?;
        let path = file.path()?.into_owned();
        let is_dir = file.header().entry_type().is_dir();
        files.push(FileInArchive { path, is_dir });
    }
    Ok(files)
}
pub fn list_archive ( reader : Box < dyn Read > ) -> crate :: Result < Vec < FileInArchive > > { let mut archive = tar :: Archive :: new ( reader ) ; let mut files = vec ! [ ] ; for file in archive . entries ( ) ? { let file = file ? ; let path = file . path ( ) ? . into_owned ( ) ; let is_dir = file . header ( ) . entry_type ( ) . is_dir ( ) ; files . push ( FileInArchive { path , is_dir } ) ; } Ok ( files ) }
List contents of `archive`, returning a vector of archive entries
List contents of ` archive ` returning a vector of archive entries
reader
Box<dyn Read>
reader
Box<dyn Read>