Documentation
¶
Index ¶
- Variables
- func RenderNodes(displayNodes []*Node, format TreeFormat, cursor int, ...) string
- type Node
- func (node *Node) Children() []*Node
- func (node *Node) Deselect(recurse bool)
- func (node *Node) IsDir() bool
- func (node *Node) IsRoot() bool
- func (node *Node) IsSelected() bool
- func (node *Node) LoadChildren(recurse bool, maxDepth int, visitFunc func(node *Node)) error
- func (node *Node) Parent() *Node
- func (node *Node) Select(recurse bool, maxDepth int)
- func (node *Node) SelectedFiles() []string
- func (node *Node) SelectedStats() (files int, dirs int)
- type Tree
- type TreeFormat
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Standard = TreeFormat{ Space: " ", Span: "│ ", Node: "├── ", NodeLast: "└── ", } Compact = TreeFormat{ Space: " ", Span: "│ ", Node: "├ ", NodeLast: "└ ", } )
Functions ¶
func RenderNodes ¶
Types ¶
type Node ¶
type Node struct {
Path string
Name string
Expanded bool
// contains filtered or unexported fields
}
func FlattenTree ¶
FlattenTree returns []*Node consistent with each node's `Expanded` state
func (*Node) IsSelected ¶
func (*Node) LoadChildren ¶
func (*Node) SelectedFiles ¶
SelectedFiles returns the paths of all selected non-directory nodes in the subtree rooted at this node.
func (*Node) SelectedStats ¶
SelectedStats returns the count of selected files and selected directories in the subtree rooted at this node.
Click to show internal directories.
Click to hide internal directories.