pub fn is_dir(path: &Path) -> bool
Check if a directory Not sure why the .is_dir() is not works https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.is_dir