fn look_in_ancestral_paths(expected_path:&str) -> Option<PathBuf> {
        let mut search = Path::new(".").canonicalize().ok();
        while let Some(p) = search {
            let possible = p.join(expected_path);
            if possible.exists() { return Some(possible)}
            search = p.parent().map(|p|p.to_path_buf());
        }
        None
    }
/// find an expected path in the current dir. If not there, check the parent, and continue recursively. Return the full path if found.
find an expected path in the current dir. If not there, check the parent, and continue recursively. Return the full path if found.
find an expected path in the current dir . If not there check the parent and continue recursively . Return the full path if found .
fn look_in_ancestral_paths(expected_path:&str) -> Option<PathBuf> {
        let mut search = Path::new(".").canonicalize().ok();
        while let Some(p) = search {
            let possible = p.join(expected_path);
            if possible.exists() { return Some(possible)}
            search = p.parent().map(|p|p.to_path_buf());
        }
        None
    }
fn look_in_ancestral_paths ( expected_path : & str ) -> Option < PathBuf > { let mut search = Path :: new ( " " ) . canonicalize ( ) . ok ( ) ; while let Some ( p ) = search { let possible = p . join ( expected_path ) ; if possible . exists ( ) { return Some ( possible ) } search = p . parent ( ) . map ( | p | p . to_path_buf ( ) ) ; } None }
find an expected path in the current dir.
find an expected path in the current dir .
expected_path
&str
expected_path
&str