walker

package
v0.0.0-...-613c932 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExcludeError    = errors.New("file is in exclude list")
	SkipDirError    = errors.New("skipping recursive dir walk")
	NotProcessError = errors.New("not processing file")
)

Functions

func NewDirWalker

func NewDirWalker(keepOrder bool) *dirWalker

Types

type ErrorAction

type ErrorAction int
const (
	Halt ErrorAction = iota
	SkipNode
)

type FileInfo

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

func NewFileInfoFromDe

func NewFileInfoFromDe(de *godirwalk.Dirent) *FileInfo

func NewFileInfoFromOsFile

func NewFileInfoFromOsFile(f os.FileInfo) *FileInfo

func (*FileInfo) IsDir

func (w *FileInfo) IsDir() bool

func (*FileInfo) IsRegular

func (w *FileInfo) IsRegular() bool

func (*FileInfo) Name

func (w *FileInfo) Name() string

type FileInfoI

type FileInfoI interface {
	Name() string
	IsDir() bool
	IsRegular() bool
}

type WalkErrFunc

type WalkErrFunc func(osPathname string, err error) ErrorAction

type WalkFunc

type WalkFunc func(osPathname string, directoryEntry FileInfoI) error

type Walker

type Walker interface {
	Walk(path string, callback WalkFunc, errCallback WalkErrFunc) error
}

Jump to

Keyboard shortcuts

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