gomp/fileBrowser.go
aditya-K2 0c107c3a72 All the File Browsing Related Functions and Structs are inside the FileBrowser.go file.
The Idea is to Implement a tree of sorts (At least for now) and then displaying the children of the current Node and traversing them.
2021-10-09 22:34:11 +05:30

12 lines
236 B
Go

package main
type FileNode struct{
children [] FileNode
path string
parent *FileNode
}
func (f *FileNode) addChildren(path string){
f.children = append(f.children, FileNode{children: make([]FileNode, 0), path: path, parent: f})
}