treefs

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generate added in v0.2.5

type Generate func(target string) (fs.File, error)

func (Generate) Generate added in v0.2.5

func (fn Generate) Generate(target string) (fs.File, error)

type Generator

type Generator interface {
	Generate(target string) (fs.File, error)
}

type Node

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

func New

func New(name string) *Node

func (*Node) Children

func (n *Node) Children() (children []*Node)

Children returns a list of children, ordered alphanumerically.

func (*Node) Delete

func (n *Node) Delete(path ...string) (node *Node, found bool)

func (*Node) DirGenerator added in v0.2.5

func (n *Node) DirGenerator(path string, generator Generator) *Node

func (*Node) Entries added in v0.2.5

func (n *Node) Entries() (entries []fs.DirEntry)

func (*Node) FileGenerator added in v0.2.5

func (n *Node) FileGenerator(path string, generator Generator) *Node

func (*Node) Find

func (n *Node) Find(path string) (node *Node, found bool)

func (*Node) FindByPrefix

func (n *Node) FindByPrefix(path string) (node *Node, prefix string, found bool)

func (*Node) Mode

func (n *Node) Mode() fs.FileMode

func (*Node) Open added in v0.2.5

func (n *Node) Open(target string) (fs.File, error)

func (*Node) Path

func (n *Node) Path() string

func (*Node) Print

func (n *Node) Print() string

Print the nodes in the tree.

Jump to

Keyboard shortcuts

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