walker

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPermitDiskName

func AppendPermitDiskName(s ...string)

Types

type FS

type FS struct{}

FS is the filesystem walker

func NewFS

func NewFS() *FS

func (*FS) BuildSkipPaths

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

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

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

type VM

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

func NewVM

func NewVM() *VM

func (*VM) Walk

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