render fs tree

This commit is contained in:
2025-12-31 03:56:32 +00:00
parent c59bdad8aa
commit bf167e1d8a
3 changed files with 41 additions and 7 deletions
+6 -1
View File
@@ -28,6 +28,11 @@ func walkFileSystemAndBuildTree(rootPath string, node *FsNode) error {
}
for _, entry := range entries {
// dot folders and files skipped
if len(entry.Name()) > 0 && entry.Name()[0] == '.' {
continue
}
childPath := filepath.Join(rootPath, entry.Name())
var nodeType FsNodeType
@@ -42,7 +47,7 @@ func walkFileSystemAndBuildTree(rootPath string, node *FsNode) error {
path: childPath,
children: make([]*FsNode, 0),
parent: node,
expanded: false,
expanded: true,
}
node.children = append(node.children, childNode)