/// returns the first settings resource file found in the list of resource directories.
returns the first settings resource file found in the list of resource directories.
returns the first settings resource file found in the list of resource directories .
fn find_resource_dir(resource: &str, dirs: &[PathBuf]) -> Option<PathBuf> {
        for d in dirs.iter() {
            let walker = Self::make_glob_walker(&d, format!("{}.*", resource));
            let walker = match walker {
                Some(w) => w,
                None => continue,
            };
            let found = walker
                .into_iter()
                .filter_map(|entry| {
                    tracing::info!("found settings entry: {entry:?}");
                    Result::ok(entry)
                })
                .next()
                .is_some();
            if found {
                tracing::info!("found settings {resource} file in base-directory:{d:?}");
                return Some(d.clone());
            }
        }
        tracing::warn!("no settings resource found for {resource} in {dirs:?}");
        None
    }
fn find_resource_dir ( resource : & str , dirs : & [ PathBuf ] ) -> Option < PathBuf > { for d in dirs . iter ( ) { let walker = Self :: make_glob_walker ( & d , format ! ( " " resource ) ) ; let walker = match walker { Some ( w ) => w , None => continue , } ; let found = walker . into_iter ( ) . filter_map ( | entry | { tracing :: info ! ( " " ) ; Result :: ok ( entry ) } ) . next ( ) . is_some ( ) ; if found { tracing :: info ! ( " " ) ; return Some ( d . clone ( ) ) ; } } tracing :: warn ! ( " " ) ; None }
returns the first settings resource file found in the list of resource directories.
returns the first settings resource file found in the list of resource directories .
resource
&str
dirs
&[PathBuf]