/// Load FMS Entries from the local metadata.
///
/// Whether the sdk or local build is used is determined by ffx_config::sdk.
/// No attempt is made to refresh the metadata (no network IO).
Load FMS Entries from the local metadata.
Whether the sdk or local build is used is determined by ffx_config::sdk.
No attempt is made to refresh the metadata (no network IO).
Load FMS Entries from the local metadata . Whether the sdk or local build is used is determined by ffx_config :: sdk . No attempt is made to refresh the metadata ( no network IO ) .
pub(crate) async fn local_entries(version: &str) -> Result<Entries> {
    let pb_path = local_metadata_dir(version).await.context("local metadata path")?;
    let mut entries = Entries::new();
    let mut dir = async_fs::read_dir(&pb_path).await?;
    while let Some(entry) = dir.try_next().await? {
        let path = entry.path();
        if !path.is_file() {
            continue;
        }
        let mut container = File::open(&path)
            .map(BufReader::new)
            .with_context(|| format!("Open file \"{}\".", path.display()))?;
        entries.add_json(&mut container)?;
    }
    Ok(entries)
}
pub ( crate ) async fn local_entries ( version : & str ) -> Result < Entries > { let pb_path = local_metadata_dir ( version ) . await . context ( " " ) ? ; let mut entries = Entries :: new ( ) ; let mut dir = async_fs :: read_dir ( & pb_path ) . await ? ; while let Some ( entry ) = dir . try_next ( ) . await ? { let path = entry . path ( ) ; if ! path . is_file ( ) { continue ; } let mut container = File :: open ( & path ) . map ( BufReader :: new ) . with_context ( | | format ! ( " \" \" " path display ( ) ) ) ? ; entries . add_json ( & mut container ) ? ; } Ok ( entries ) }
Load FMS Entries from the local metadata.
Load FMS Entries from the local metadata .
version
&str