Skip to main content

dir_entry

Function dir_entry 

Source
fn dir_entry(entry: &DirEntry) -> DirEntry
Expand description

file_type() is the entry’s own type, so a symlink shows as one (no follow); metadata() follows symlinks, so a symlinked dir reports is_dir. Both are needed: is_symlink from the first, is_dir and size from the second (a symlink-to-dir reads as a directory, matching VS Code).