Given a path, we can recursively list all folders from a starting directory
for entry in WalkDir::new("foo").into_iter().filter_map(|e| e.ok()) {
println!("{}", entry.path().display());
}
Does a crate exists what provides a graph like structure
struct File (HashMap<String, File>);
If not how would be the best way to populate the hashmap. I cannot seem to take each Component without either doing infinite recursion or having my nested loop go so deep.
The example you gave goes "backwards" from a given path but I want to go "forwards".
This is workable but I am not sure on how good this is as a working example if you could suggest some improvements?