/// Download and expand data.
///
/// For a directory, all files in the directory are downloaded.
/// For a .tgz file, the file is downloaded and expanded.
Download and expand data.
For a directory, all files in the directory are downloaded.
For a .tgz file, the file is downloaded and expanded.
Download and expand data . For a directory all files in the directory are downloaded . For a . tgz file the file is downloaded and expanded .
async fn fetch_by_format(format: &str, uri: &str, local_dir: &Path) -> Result<()> {
    match format {
        "files" | "tgz" => fetch_bundle_uri(uri, &local_dir).await,
        _ =>
        // The schema currently defines only "files" or "tgz" (see RFC-100).
        // This error could be a typo in the product bundle or a new image
        // format has been added and this code needs an update.
        {
            bail!(
                "Unexpected image format ({:?}) in product bundle. \
            Supported formats are \"files\" and \"tgz\". \
            Please report as a bug.",
                format,
            )
        }
    }
}
async fn fetch_by_format ( format : & str , uri : & str , local_dir : & Path ) -> Result < ( ) > { match format { " " | " " => fetch_bundle_uri ( uri , & local_dir ) . await , _ => // The schema currently defines only "files" or "tgz" (see RFC-100). // This error could be a typo in the product bundle or a new image // format has been added and this code needs an update. { bail ! ( " \
 \" \" \" \" \
 " format ) } } }
Download and expand data.
Download and expand data .
format
&str
uri
&str
local_dir
&Path