pub fn get_paths_to_only_dirs_in_dir_and_sub_dirs<T: Display>(
arg_string_path_dir: &T,
) -> Result<Vec<String>, String>
Expand description
Returns a vec of string paths inside directory In case of a failure, this returns an error explaining what happened
§Arguments
- arg_string_path: string-like path
§Examples
let string_path = “test”;
let result = match get_paths_to_only_dirs_in_dir_and_sub_dirs( &string_path ) {
Ok( vec_result ) => vec_result,
Err( err ) => panic!( “{}”, err, )
};
let expected = [
“test/test_b”,
“test/test_b/test_c”,
“test/test_a”,
].iter().map(|item_str| {item_str.to_string()}).collect::<Vec