pub fn find_pkg_directory(path: &Path) -> Option<PathBuf> {
    if is_pkg_directory(path) {
        return Some(path.to_owned());
    }

    WalkDir::new(path)
        .into_iter()
        .filter_map(|x| x.ok().map(|e| e.into_path()))
        .find(|x| is_pkg_directory(&x))
}
/// Locates the pkg directory from a specific path
/// Returns None if unable to find the 'pkg' directory
Locates the pkg directory from a specific path
Returns None if unable to find the 'pkg' directory
Locates the pkg directory from a specific path Returns None if unable to find the ' pkg ' directory
pub fn find_pkg_directory(path: &Path) -> Option<PathBuf> {
    if is_pkg_directory(path) {
        return Some(path.to_owned());
    }
    WalkDir::new(path)
        .into_iter()
        .filter_map(|x| x.ok().map(|e| e.into_path()))
        .find(|x| is_pkg_directory(&x))
}
pub fn find_pkg_directory ( path : & Path ) -> Option < PathBuf > { if is_pkg_directory ( path ) { return Some ( path . to_owned ( ) ) ; } WalkDir :: new ( path ) . into_iter ( ) . filter_map ( | x | x . ok ( ) . map ( | e | e . into_path ( ) ) ) . find ( | x | is_pkg_directory ( & x ) ) }
Locates the pkg directory from a specific path
Returns None if unable to find the 'pkg' directory
Locates the pkg directory from a specific path Returns None if unable to find the ' pkg ' directory
path
&Path