Function compress_tools::list_archive_files_with_encoding
source · pub fn list_archive_files_with_encoding<R>(
source: R,
decode: DecodeCallback
) -> Result<Vec<String>>where
R: Read + Seek,
Expand description
Get all files in a archive using source
as a reader.
Example
use compress_tools::*;
use std::fs::File;
let mut source = File::open("tree.tar")?;
let decode_utf8 = |bytes: &[u8]| Ok(std::str::from_utf8(bytes)?.to_owned());
let file_list = list_archive_files_with_encoding(&mut source, decode_utf8)?;