Documentation ¶
Overview ¶
Package path implements path manipulation routines used by cmaketobzl.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitCommonRoot ¶
SplitCommonRoot finds the longest command whole-segment prefix of the provided path and returns that along with each path stripped of that prefix.
func SplitCommonRootString ¶
SplitCommonRootString finds the longest command whole-segment prefix of the provided path and returns that along with each path stripped of that prefix as /-delimited strings.
Types ¶
type Path ¶
type Path []string
Path is a slice of string segments, representing a filesystem path.
func Append ¶
Append appends additional elements to the end of path, disregarding the leading '/' on appended elements.
func AppendString ¶
AppendString appends additional string elements to the end of path.
func JoinString ¶
JoinString joins path and any number of additional string elements, returning the result.
func LongestCommonPrefix ¶
LongestCommonPrefix returns the longest shared Path prefix of all of the paths.
type PreVisitor ¶
PreVisitor is a single-function pre-order PathVisitor implementation.
func (PreVisitor) Enter ¶
func (p PreVisitor) Enter(dir Path) ([]Path, error)
Enter implements Visitor for PrePathVisitor.
func (PreVisitor) Leave ¶
func (PreVisitor) Leave(Path) error
Leave implements Visitor for PrePathVisitor.