walker

package
v0.0.0-...-51f1176 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ThresholdSize = int64(200) << 20

Variables

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

Functions

This section is empty.

Types

type FS

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

func NewFS

func NewFS(skipFiles, skipDirs []string) 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 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