pathtools

package
v0.0.0-...-36bb07c Latest Latest
Warning

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

Go to latest
Published: May 11, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobLastRecursiveErr = errors.New("pattern ** as last path element")
View Source
var GlobMultipleRecursiveErr = errors.New("pattern contains multiple **")

Functions

func Glob

func Glob(pattern string) (matches, dirs []string, err error)

Glob returns the list of files that match the given pattern along with the list of directories that were searched to construct the file list. The supported glob patterns are equivalent to filepath.Glob, with an extension that recursive glob (** matching zero or more complete path entries) is supported.

func GlobPatternList

func GlobPatternList(patterns []string, prefix string) (globedList []string, depDirs []string, err error)

func GlobWithExcludes

func GlobWithExcludes(pattern string, excludes []string) (matches, dirs []string, err error)

GlobWithExcludes returns the list of files that match the given pattern but do not match the given exclude patterns, along with the list of directories that were searched to construct the file list. The supported glob and exclude patterns are equivalent to filepath.Glob, with an extension that recursive glob (** matching zero or more complete path entries) is supported.

func PrefixPaths

func PrefixPaths(paths []string, prefix string) []string

PrefixPaths returns a list of paths consisting of prefix joined with each element of paths. The resulting paths are "clean" in the filepath.Clean sense.

func ReplaceExtension

func ReplaceExtension(path string, extension string) string

func ReplaceExtensions

func ReplaceExtensions(paths []string, extension string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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