decompress_file_with_extract_fn

Function decompress_file_with_extract_fn 

Source
pub async fn decompress_file_with_extract_fn(
    src_path: impl AsRef<Path>,
    dest: impl AsRef<Path>,
    extract_fn: impl for<'a> FnMut(&'a ArchiveEntry, &'a mut (dyn AsyncRead + Unpin + Send + 'a), &'a Path) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'a>> + 'static + Send,
) -> Result<(), Error>
Available on non-WebAssembly only.
Expand description

Decompresses an archive file to a destination directory with a custom extraction function.

The extraction function is called for each entry in the archive, allowing custom handling of individual files and directories during extraction.

ยงArguments

  • src_path - Path to the source archive file
  • dest - Path to the destination directory where files will be extracted
  • extract_fn - Custom function to handle each archive entry during extraction