Skip to main content

icon_for_path

Function icon_for_path 

pub fn icon_for_path(path: &Path, is_dir: bool) -> Icon
Expand description

Map a filesystem entry to the most appropriate Icon. Directories always resolve to Icon::Folder; files are classified by (lower-cased) extension, falling back to Icon::File.

Single source of truth for “what glyph represents this path” across the toolkit, so every consumer renders a consistent set.