glob

package
v0.0.0-...-a61cce2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stat

func Stat(plike PathLike, path string) (os.FileMode, error)

func Traverse

func Traverse(plike PathLike, path GlobPath, walkFn WalkFn) []error

Types

type ExpanderFn

type ExpanderFn (func(parent globPath) ([]globPath, []error))

type GlobPath

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

func EmptyGlobPath

func EmptyGlobPath() GlobPath

func Expand

func Expand(plike PathLike, path GlobPath) ([]GlobPath, []error)

func Resolve

func Resolve(plike PathLike, path string) (GlobPath, error)

Resolve : Generic Resolve function that dispatch its call to PathLike interface.

func (GlobPath) FileMode

func (g GlobPath) FileMode() os.FileMode

func (GlobPath) Path

func (g GlobPath) Path() string

type PathLike

type PathLike interface {
	Expander() ExpanderFn
	Resolver() ResolveFn
	Stat() StatFn
	Traverse() TraverseFn
}

type ResolveFn

type ResolveFn (func(path string, statFn StatFn) (globPath, error))

type StatFn

type StatFn (func(path string) (os.FileMode, error))

type TraverseFn

type TraverseFn (func(path globPath, walkFn WalkFn) error)

type WalkFn

type WalkFn (func(path string, expanderFn ExpanderFn, err error) []error)

Jump to

Keyboard shortcuts

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