Function fs_extra::dir::get_dir_content[][src]

pub fn get_dir_content<P>(path: P) -> Result<DirContent> where
    P: AsRef<Path>, 

Return DirContent which containt information about directory:

Errors

This function will return an error in the following situations, but is not limited to just these cases:

Examples

extern crate fs_extra;
use fs_extra::dir::get_dir_content;

let dir_content = get_dir_content("dir")?;
for directory in dir_content.directories {
    println!("{}", directory); // print directory path
}