NewFileTree creates an empty FileTree
()
| 33 | |
| 34 | // NewFileTree creates an empty FileTree |
| 35 | func NewFileTree() (tree *FileTree) { |
| 36 | tree = new(FileTree) |
| 37 | tree.Size = 0 |
| 38 | tree.Root = new(FileNode) |
| 39 | tree.Root.Tree = tree |
| 40 | tree.Root.Children = make(map[string]*FileNode) |
| 41 | tree.Id = uuid.New() |
| 42 | tree.SortOrder = ByName |
| 43 | return tree |
| 44 | } |
| 45 | |
| 46 | // renderParams is a representation of a FileNode in the context of the greater tree. All |
| 47 | // data stored is necessary for rendering a single line in a tree format. |
no outgoing calls