pub fn scan(path: &str, extension: &str, consumer: &mut dyn Consume) -> usize {
    let parallelism = Parallelism::RayonNewPool(num_cpus::get_physical());

    let iter = WalkDir::new(path)
        .skip_hidden(false)
        .follow_links(false)
        .parallelism(parallelism);

    let ext = extension.trim_start_matches('.');

    iter.into_iter()
        .filter(Result::is_ok)
        .map(Result::unwrap)
        .filter(|f| f.file_type().is_file())
        .map(|f| f.path())
        .filter(|p| {
            return match p.extension() {
                Some(s) => s == ext,
                None => false,
            };
        })
        .map(|f| f.to_str().unwrap_or("").to_string())
        .inspect(|fp| parse_file(fp, consumer))
        .count()
}
/// scan parses directory specified by path. recursively
/// it finds all files with sln extension and parses them.
/// returns the number of scanned solutions
scan parses directory specified by path. recursively
it finds all files with sln extension and parses them.
returns the number of scanned solutions
scan parses directory specified by path . recursively it finds all files with sln extension and parses them . returns the number of scanned solutions
pub fn scan(path: &str, extension: &str, consumer: &mut dyn Consume) -> usize {
    let parallelism = Parallelism::RayonNewPool(num_cpus::get_physical());
    let iter = WalkDir::new(path)
        .skip_hidden(false)
        .follow_links(false)
        .parallelism(parallelism);
    let ext = extension.trim_start_matches('.');
    iter.into_iter()
        .filter(Result::is_ok)
        .map(Result::unwrap)
        .filter(|f| f.file_type().is_file())
        .map(|f| f.path())
        .filter(|p| {
            return match p.extension() {
                Some(s) => s == ext,
                None => false,
            };
        })
        .map(|f| f.to_str().unwrap_or("").to_string())
        .inspect(|fp| parse_file(fp, consumer))
        .count()
}
pub fn scan ( path : & str , extension : & str , consumer : & mut dyn Consume ) -> usize { let parallelism = Parallelism :: RayonNewPool ( num_cpus :: get_physical ( ) ) ; let iter = WalkDir :: new ( path ) . skip_hidden ( false ) . follow_links ( false ) . parallelism ( parallelism ) ; let ext = extension . trim_start_matches ( '.' ) ; iter . into_iter ( ) . filter ( Result :: is_ok ) . map ( Result :: unwrap ) . filter ( | f | f . file_type ( ) . is_file ( ) ) . map ( | f | f . path ( ) ) . filter ( | p | { return match p . extension ( ) { Some ( s ) => s == ext , None => false , } ; } ) . map ( | f | f . to_str ( ) . unwrap_or ( " " ) . to_string ( ) ) . inspect ( | fp | parse_file ( fp , consumer ) ) . count ( ) }
scan parses directory specified by path.
scan parses directory specified by path .
path
&str
extension
&str
consumer
&mut dyn Consume