filesystem

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindKitfileInPath

func FindKitfileInPath(contextDir string) (string, error)

Searches for a kit file in the given context directory. It checks for accepted kitfile names and returns the absolute path for the first found kitfile. If no kitfile is found, returns error

func PathExists

func PathExists(path string) (fs.FileInfo, bool)

func VerifySubpath

func VerifySubpath(context, subDir string) (absPath, relPath string, err error)

VerifySubpath checks that filepath.Join(context, subDir) is a subdirectory of context, following symlinks if present.

Types

type IgnorePaths

type IgnorePaths interface {
	Matches(path, layerPath string) (bool, error)
	HasExclusions() bool
}

func NewIgnore

func NewIgnore(kitIgnorePaths []string, kitfile *artifact.KitFile, extraLayers ...string) (IgnorePaths, error)

func NewIgnoreFromContext

func NewIgnoreFromContext(contextDir string, kitfile *artifact.KitFile, extraLayers ...string) (IgnorePaths, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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