tree

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

Tree is a hierarchical representation of the directory contents

func NewTree

func NewTree(paths []string) Tree

NewTree creates a new Tree struct from the passed list of directory paths

func (Tree) GetNode added in v0.4.2

func (t Tree) GetNode(path string) node.Node

GetNode returns a node record for the given path

func (Tree) LevelChildItems added in v0.4.2

func (t Tree) LevelChildItems(idx int, parentPath string) (items map[string]string)

LevelChildItems gives us a list of child items for the [parent] node located on the given level ID and on the given path

func (Tree) LevelChildNames added in v0.4.2

func (t Tree) LevelChildNames(idx int, parentPath string) []string

LevelChildNames gives us a list of child names for the [parent] node located on the given level ID and on the given path

func (Tree) LevelCount

func (t Tree) LevelCount() int

LevelCount gives us the number of hierarchical levels inside the tree

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL