As many others, with beta, I’m trying rust with a small program. In this program I want to walk a directory tree.
Because std::fs::walk_dir is currently unstable I’m looking for other solution.
The std::fs::read_dir documentation suggest a possible implementation of fs::walk_dir but don’t show how to call it.
The signature is
visit_dirs(dir: &Path, cb: &mut FnMut(DirEntry)) -> io::Result<()> and this is the
cb: &mut FnMut(DirEntry) that I don’t grasp.
Thanks for your help.
Ok, so it seems I haven’t read enough of the book and the cb parameter is a closure … anyway this function use unstable feature
So finally any idea to implement a directory tree walk with beta ?