fspatterns

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSymlinkFileDetails

func CreateSymlinkFileDetails() (*fileutils.FileDetails, error)

When handling symlink we want to simulate the creation of empty file

func GetFileSymlinkPath

func GetFileSymlinkPath(filePath string) (string, error)

If filePath is path to a symlink we should return the link content e.g where the link points

func GetRootPath

func GetRootPath(pattern, target, archiveTarget string, patternType utils.PatternType, preserveSymLink bool) (string, error)

Get the local root path, from which to start collecting artifacts to be uploaded to Artifactory. If path does not exist error will be returned.

func GetSingleFileToUpload

func GetSingleFileToUpload(rootPath, targetPath string, flat bool) (utils.Artifact, error)

func ListFiles added in v1.25.0

func ListFiles(rootPath string, isRecursive, includeDirs, excludeWithRelativePath, isSymlink bool, excludePathPattern string) ([]string, error)

Return all the existing paths of the provided root path

func PrepareExcludePathPattern

func PrepareExcludePathPattern(exclusions []string, patternType utils.PatternType, isRecursive bool) string

Transform to regexp and prepare Exclude patterns to be used, exclusion patterns must be absolute paths.

func SearchPatterns added in v1.25.0

func SearchPatterns(path string, preserveSymlinks, includeDirs bool, regexp *regexp.Regexp) (matches []string, isDir bool, err error)

Return the actual sub-paths that match the regex provided. Excluded sub-paths are not returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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