bounded_tree

package
v0.0.0-...-935c85c Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoundedTree

type BoundedTree struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewBoundedTree

func NewBoundedTree(baseDir util.FullPath) *BoundedTree

func (*BoundedTree) EnsureVisited

func (t *BoundedTree) EnsureVisited(p util.FullPath, visitFn VisitNodeFunc) (visitErr error)

If the path is not visited, call the visitFn for each level of directory No action if the directory has been visited before or does not exist. A leaf node, which has no children, represents a directory not visited. A non-leaf node or a non-existing node represents a directory already visited, or does not need to visit.

func (*BoundedTree) HasVisited

func (t *BoundedTree) HasVisited(p util.FullPath) bool

type Node

type Node struct {
	Parent   *Node
	Name     string
	Children map[string]*Node
}

type VisitNodeFunc

type VisitNodeFunc func(path util.FullPath) (childDirectories []string, err error)

Jump to

Keyboard shortcuts

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