walker

package
v0.50.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// These variables are exported so that a tool importing Trivy as a library can override these values.
	AppDirs    = []string{".git"}
	SystemDirs = []string{
		"proc",
		"sys",
		"dev",
	}
)

Functions

func AppendPermitDiskName added in v0.35.0

func AppendPermitDiskName(s ...string)

Types

type ErrorCallback added in v0.41.0

type ErrorCallback func(pathname string, err error) error

type FS

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

func NewFS

func NewFS(skipFiles, skipDirs []string, parallel int, errCallback ErrorCallback) FS

func (FS) Walk

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

Walk walks the file tree rooted at root, calling WalkFunc for each file or directory in the tree, including root, but a directory to be ignored will be skipped.

type LayerTar

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

func NewLayerTar

func NewLayerTar(skipFiles, skipDirs []string) LayerTar

func (LayerTar) Walk

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

type VM added in v0.35.0

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

func NewVM added in v0.35.0

func NewVM(skipFiles, skipDirs []string) *VM

func (*VM) Walk added in v0.35.0

func (w *VM) Walk(vreader *io.SectionReader, root string, 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