Function fs_extra::dir::get_dir_content2[][src]

pub fn get_dir_content2<P>(path: P, options: &DirOptions) -> 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_content2;

let options = DirOptions::new();
options.depth = 3; // Get 3 levels of folder.
let dir_content = get_dir_content2("dir", &options)?;
for directory in dir_content.directories {
    println!("{}", directory); // print directory path
}