filetree

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: AGPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StopVisiting     = true
	ContinueVisiting = false
)

Variables

This section is empty.

Functions

func BuildPath

func BuildPath(_path []string, entry string) string

func WalkTree

func WalkTree(node *model.Node, visitor FileTreeVistor)

Types

type FileTreeCtx

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

func CreateFileTreeCtx

func CreateFileTreeCtx() FileTreeCtx

func (*FileTreeCtx) AddDocument

func (ctx *FileTreeCtx) AddDocument(document *model.Document)

func (*FileTreeCtx) Clear added in v0.0.23

func (ctx *FileTreeCtx) Clear()

func (*FileTreeCtx) DeleteNode

func (ctx *FileTreeCtx) DeleteNode(node *model.Node)

func (*FileTreeCtx) MoveNode

func (ctx *FileTreeCtx) MoveNode(src, dst *model.Node)

func (*FileTreeCtx) NodeById added in v0.0.4

func (ctx *FileTreeCtx) NodeById(id string) *model.Node

func (*FileTreeCtx) NodeByPath

func (ctx *FileTreeCtx) NodeByPath(path string, current *model.Node) (*model.Node, error)

func (*FileTreeCtx) NodeToPath

func (ctx *FileTreeCtx) NodeToPath(targetNode *model.Node) (string, error)

func (*FileTreeCtx) Root

func (ctx *FileTreeCtx) Root() *model.Node

type FileTreeVistor

type FileTreeVistor struct {
	Visit func(node *model.Node, path []string) bool
}

Jump to

Keyboard shortcuts

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