Skip to content

getFileIconKind

getFileIconKind(node, expanded?): FileIconKind

Defined in: src/components/controls/FileTree/fileTreeIcons.ts:145

Resolves the icon kind for a node. Folders return folder-open when expanded, else folder. Files use the explicit ext when provided, falling back to the extension parsed from name.

Parameters

node

Pick<FileTreeNode, "kind" | "name" | "ext">

expanded?

boolean = false

Returns

FileIconKind