Skip to content

buildFileTree

buildFileTree(entries, basePath?): TreeNode[]

Defined in: src/widgets/data/file-tree.ts:98

Shape a directory listing into <Tree>-ready TreeNodes, deriving each node’s id from its path (joined by /) and its icon from iconForEntry. Directories sort before files, then alphabetically, within each level (pass already-sorted entries to skip this).

FileEntry[]

string = ""

TreeNode[]