walker

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPermitDiskName added in v0.35.0

func AppendPermitDiskName(s ...string)

func CleanSkipPaths added in v0.51.0

func CleanSkipPaths(skipPaths []string) []string

func SkipPath added in v0.51.0

func SkipPath(path string, skipPaths []string) bool

Types

type FS

type FS struct{}

FS is the filesystem walker

func NewFS

func NewFS() *FS

func (*FS) BuildSkipPaths added in v0.51.0

func (w *FS) BuildSkipPaths(base string, paths []string) []string

BuildSkipPaths builds correct patch for defaultSkipDirs and skipFiles

func (*FS) Walk

func (w *FS) Walk(root string, opt Option, fn WalkFunc) error

Walk walks the filesystem rooted at root, calling fn for each unfiltered file.

func (*FS) WalkDirFunc added in v0.51.0

func (w *FS) WalkDirFunc(root string, fn WalkFunc, opt Option) fs.WalkDirFunc

type LayerTar

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

func NewLayerTar

func NewLayerTar(opt Option) LayerTar

func (LayerTar) Walk

func (w LayerTar) Walk(layer io.Reader, analyzeFn WalkFunc) ([]string, []string, error)

type Option added in v0.51.0

type Option struct {
	SkipFiles []string
	SkipDirs  []string
}

type VM added in v0.35.0

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

func NewVM added in v0.35.0

func NewVM() *VM

func (*VM) Walk added in v0.35.0

func (w *VM) Walk(vreader *io.SectionReader, root string, opt Option, fn WalkFunc) error

type WalkFunc

type WalkFunc func(filePath string, info os.FileInfo, opener analyzer.Opener) error

Jump to

Keyboard shortcuts

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