Function brane_shr::fs::archive_async

source ·
pub async fn archive_async(
    source: impl AsRef<Path>,
    tarball: impl AsRef<Path>,
    skip_root_dir: bool,
) -> Result<(), Error>
Expand description

Archives the given file or directory as a .tar.gz file.

§Arguments

  • source: The source file or directory to archive.
  • tarball: The target tarball file to archive to.
  • skip_root_dir: If the source points to a directory, then this determines whether to trim it (true) or not (false) in the resulting tarfile (i.e., the files in the root dir will be in the tar’s root instead of the directory). Ignore otherwise.

§Errors

This function errors if we somehow encountered an error.