Function fs_extra::dir::get_details_entry[][src]

pub fn get_details_entry<P>(
    path: P,
    config: &HashSet<DirEntryAttr>
) -> Result<HashMap<DirEntryAttr, DirEntryValue>> where
    P: AsRef<Path>, 

Returned information about directory entry with information which you choose in config.

This function takes to arguments:

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_details_entry, DirEntryAttr};
use std::collections::{HashMap, HashSet};

let mut config = HashSet::new();
config.insert(DirEntryAttr::Name);
config.insert(DirEntryAttr::Size);

let entry_info = get_details_entry("test", &config);
assert_eq!(2, entry_info.len());