fn _find_paths(dir: &Path, v: &mut Vec<PathBuf>) -> io::Result<()> {
    if dir.is_dir() {
        for entry in fs::read_dir(dir)? {
            let entry = entry?;
            let path = entry.path();
            if path.is_dir() {
                _find_paths(&path, v)?;
            } else {
                Vec::push(v, path);
            }
        }
    }
    Ok(())
}
/// Find all the file paths in a directory
Find all the file paths in a directory
Find all the file paths in a directory
fn _find_paths(dir: &Path, v: &mut Vec<PathBuf>) -> io::Result<()> {
    if dir.is_dir() {
        for entry in fs::read_dir(dir)? {
            let entry = entry?;
            let path = entry.path();
            if path.is_dir() {
                _find_paths(&path, v)?;
            } else {
                Vec::push(v, path);
            }
        }
    }
    Ok(())
}
fn _find_paths ( dir : & Path , v : & mut Vec < PathBuf > ) -> io :: Result < ( ) > { if dir . is_dir ( ) { for entry in fs :: read_dir ( dir ) ? { let entry = entry ? ; let path = entry . path ( ) ; if path . is_dir ( ) { _find_paths ( & path , v ) ? ; } else { Vec :: push ( v , path ) ; } } } Ok ( ( ) ) }
Find all the file paths in a directory
Find all the file paths in a directory
dir
&Path
v
&mut Vec<PathBuf>
dir
&Path
v
&mut Vec<PathBuf>