fn recursive_listdir(path: &Path) -> io::Result<Vec<PathBuf>>
{
    let mut result = Vec::new();

    if let Ok(dirlisting) = path.read_dir() {
        for entry in dirlisting {
            let path = entry?.path();

            if path.is_dir() {
                result.append(&mut recursive_listdir(&path)?);
            } else {
                result.push(path);
            }
        }
    }

    Ok(result)
}
/// Given a `path`, return a vector of all the files recursively found from
/// that path.
///
/// This eats read_dir() errors to avoid Permission Denied stuff. It could be
/// improved by being more selective with ignoring errors.
Given a `path`, return a vector of all the files recursively found from
that path.

This eats read_dir() errors to avoid Permission Denied stuff. It could be
improved by being more selective with ignoring errors.
Given a ` path ` return a vector of all the files recursively found from that path . This eats read_dir () errors to avoid Permission Denied stuff . It could be improved by being more selective with ignoring errors .
fn recursive_listdir(path: &Path) -> io::Result<Vec<PathBuf>>
{
    let mut result = Vec::new();
    if let Ok(dirlisting) = path.read_dir() {
        for entry in dirlisting {
            let path = entry?.path();
            if path.is_dir() {
                result.append(&mut recursive_listdir(&path)?);
            } else {
                result.push(path);
            }
        }
    }
    Ok(result)
}
fn recursive_listdir ( path : & Path ) -> io :: Result < Vec < PathBuf > > { let mut result = Vec :: new ( ) ; if let Ok ( dirlisting ) = path . read_dir ( ) { for entry in dirlisting { let path = entry ? . path ( ) ; if path . is_dir ( ) { result . append ( & mut recursive_listdir ( & path ) ? ) ; } else { result . push ( path ) ; } } } Ok ( result ) }
Given a `path`, return a vector of all the files recursively found from
that path.
Given a ` path ` return a vector of all the files recursively found from that path .
path
&Path
path
&Path