Function generate_directory_tree
Source pub fn generate_directory_tree(path: &str) -> HashMap<String, Vec<String>>
Expand description
Generate a JSON tree based on the provided path
§Example
§Example 1
File structure:
let res = crate::dir_tree::generate_directory_tree("./src");
assert_eq!(serde_json::to_string(&res).unwrap(), r#"{"/":["lib.rs"]}"#);