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.
This commit is contained in:
aditya-K2 2021-10-09 22:31:31 +05:30
parent c0f3b6e920
commit 0c107c3a72
1 changed files with 11 additions and 0 deletions

11
fileBrowser.go Normal file
View File

@ -0,0 +1,11 @@
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})
}