Skip to main content

extract_binary

Function extract_binary 

Source
pub fn extract_binary(
    src: &Path,
    dest_dir: &Path,
    tool_name: &str,
) -> Result<PathBuf>
Expand description

Extract the binary matching tool_name from the archive at src into dest_dir. Returns the extracted binary’s path.

Supports .tar.gz (via tar + flate2) and .zip (via zip). Other formats produce UpdateError::Archive.