path

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2014 License: BSD-3-Clause, GPL-3.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rel

func Rel(path string) string

Types

type FileSystemFile

type FileSystemFile struct {
	Path  string
	IsDir bool
}

func Enumerate

func Enumerate(paths []string) ([]FileSystemFile, error)

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