pub async fn from_config() -> Result<Entries> {
    let files: Vec<PathBuf> =
        ffx_config::get("pbms.in-tree.files").await.context("ffx_config::get fms data")?;
    const SDK_ROOT: &str = "{sdk.root}/";
    let sdk_root = ffx_config::get_sdk().await.context("get sdk")?.get_path_prefix().to_path_buf();
    let files = files
        .iter()
        .map(|path| {
            // If the path starts with SDK_ROOT, replace it with sdk_root.
            match path.strip_prefix(SDK_ROOT) {
                Ok(s) => sdk_root.join(&s),
                Err(_) => path.to_path_buf(),
            }
        })
        .collect::<Vec<_>>();
    Ok(Entries::from_path_list(&files).await.context("Loading config pbms.in-tree.files")?)
}
/// Initialize the FMS database from paths in config.
///
/// Look for appropriate .json files in the "pbms.in-tree.files" config entry
/// and import metadata from them.
Initialize the FMS database from paths in config.
Look for appropriate .json files in the "pbms.in-tree.files" config entry
and import metadata from them.
Initialize the FMS database from paths in config . Look for appropriate . json files in the " pbms . in - tree . files " config entry and import metadata from them .
pub async fn from_config() -> Result<Entries> {
    let files: Vec<PathBuf> =
        ffx_config::get("pbms.in-tree.files").await.context("ffx_config::get fms data")?;
    const SDK_ROOT: &str = "{sdk.root}/";
    let sdk_root = ffx_config::get_sdk().await.context("get sdk")?.get_path_prefix().to_path_buf();
    let files = files
        .iter()
        .map(|path| {
            // If the path starts with SDK_ROOT, replace it with sdk_root.
            match path.strip_prefix(SDK_ROOT) {
                Ok(s) => sdk_root.join(&s),
                Err(_) => path.to_path_buf(),
            }
        })
        .collect::<Vec<_>>();
    Ok(Entries::from_path_list(&files).await.context("Loading config pbms.in-tree.files")?)
}
pub async fn from_config ( ) -> Result < Entries > { let files : Vec < PathBuf > = ffx_config :: get ( " " ) . await . context ( " " ) ? ; const SDK_ROOT : & str = " " ; let sdk_root = ffx_config :: get_sdk ( ) . await . context ( " " ) ? . get_path_prefix ( ) . to_path_buf ( ) ; let files = files . iter ( ) . map ( | path | { // If the path starts with SDK_ROOT, replace it with sdk_root. match path . strip_prefix ( SDK_ROOT ) { Ok ( s ) => sdk_root . join ( & s ) , Err ( _ ) => path . to_path_buf ( ) , } } ) . collect :: < Vec < _ > > ( ) ; Ok ( Entries :: from_path_list ( & files ) . await . context ( " " ) ? ) }
Initialize the FMS database from paths in config.
Initialize the FMS database from paths in config .