php/WP_CLI/Extractor.php
public static function extract( $tarball_or_zip, $dest ) {
		if ( preg_match( '/\.zip$/', $tarball_or_zip ) ) {
			return self::extract_zip( $tarball_or_zip, $dest );
		}

		if ( preg_match( '/\.tar\.gz$/', $tarball_or_zip ) ) {
			return self::extract_tarball( $tarball_or_zip, $dest );
		}
		throw new \Exception( "Extraction only supported for '.zip' and '.tar.gz' file types." );
	}
public static function extract( $tarball_or_zip, $dest ) {
		if ( preg_match( '/\.zip$/', $tarball_or_zip ) ) {
			return self::extract_zip( $tarball_or_zip, $dest );
		}

		if ( preg_match( '/\.tar\.gz$/', $tarball_or_zip ) ) {
			return self::extract_tarball( $tarball_or_zip, $dest );
		}
		throw new \Exception( "Extraction only supported for '.zip' and '.tar.gz' file types." );
	}
public static function extract ( $ tarball_or_zip , $ dest ) { if ( preg_match ( '/\.zip$/' , $ tarball_or_zip ) ) { return self :: extract_zip ( $ tarball_or_zip , $ dest ) ; } if ( preg_match ( '/\.tar\.gz$/' , $ tarball_or_zip ) ) { return self :: extract_tarball ( $ tarball_or_zip , $ dest ) ; } throw new \ Exception ( "Extraction only supported for '.zip' and '.tar.gz' file types." ) ; }
Extract the archive file to a specific destination.

@param string $dest
Extract the archive file to a specific destination .