/// Determine the path to the local metadata.
Determine the path to the local metadata.
Determine the path to the local metadata .
async fn local_metadata_dir(version: &str) -> Result<PathBuf> {
    let mut metadata_dir: PathBuf =
        ffx_config::get("pbms.data.path").await.context("get product-bundle.data.path")?;
    if version.contains("/") {
        // The version is used in a path. A leading slash will start the path at
        // root and nested slashes could allow "../".
        bail!("Slash in \"{}\". The sdk version must not contain a slash character.", version);
    }
    metadata_dir.push(version);
    std::fs::create_dir_all(&metadata_dir)?;
    Ok(metadata_dir)
}
async fn local_metadata_dir ( version : & str ) -> Result < PathBuf > { let mut metadata_dir : PathBuf = ffx_config :: get ( " " ) . await . context ( " " ) ? ; if version . contains ( " " ) { // The version is used in a path. A leading slash will start the path at // root and nested slashes could allow "../". bail ! ( " \" \" " version ) ; } metadata_dir . push ( version ) ; std :: fs :: create_dir_all ( & metadata_dir ) ? ; Ok ( metadata_dir ) }
Determine the path to the local metadata.
Determine the path to the local metadata .
version
&str