path

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: BSD-3-Clause, GPL-3.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dereference added in v0.7.0

func Dereference(path string) (string, error)

func IsRoot

func IsRoot(path string) bool

func Rel

func Rel(path string) string

func RelTo

func RelTo(path, to string) string

func UnescapeOctal

func UnescapeOctal(path string) string

Types

type FileSystemFile

type FileSystemFile struct {
	Path  string
	IsDir bool
}

type Tree

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

func NewTree

func NewTree() *Tree

func (*Tree) Add

func (tree *Tree) Add(path string, isDir bool)

Adds a path to the tree

func (*Tree) Directories

func (tree *Tree) Directories() *Tree

Finds the nodes that are directories

func (*Tree) Files

func (tree *Tree) Files() *Tree

Finds the nodes that are files

func (*Tree) Leaves

func (tree *Tree) Leaves() *Tree

Finds the leaf nodes added to the tree

func (*Tree) Paths

func (tree *Tree) Paths() []string

The set of paths in the tree

func (*Tree) TopLevel

func (tree *Tree) TopLevel() *Tree

Builds a top-level tree

Jump to

Keyboard shortcuts

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