fileset

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package fileset provides a utility for resolving the file paths defined by a FileSet proto.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptOutConfig

func ApplyOptOutConfig(fileSet *ipb.FileSet, config *apb.OptOutConfig)

ApplyOptOutConfig applies the directory traversal opt-out settings from an OptOutConfig to a FileSet.

func FileSetToString

func FileSetToString(fileSet *ipb.FileSet) string

FileSetToString returns the string representation of a FileSet.

func WalkFiles

func WalkFiles(ctx context.Context, fileSet *ipb.FileSet, fs scanapi.Filesystem, timeout time.Time, walkFunc WalkFunc) error

WalkFiles calls walkFunc for each file described by the provided FileSet.

Types

type WalkFunc

type WalkFunc func(path string, isDir bool) error

WalkFunc is the type of the function called by WalkFiles to visit each file or directory in the FileSet. If the function returns an error, WalkFiles stops and returns the same error.

Jump to

Keyboard shortcuts

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