Documentation ¶
Index ¶
- func CreateSymlinkFileDetails() (*fileutils.FileDetails, error)
- func GetFileSymlinkPath(filePath string) (string, error)
- func GetRootPath(pattern, target, archiveTarget string, patternType utils.PatternType, ...) (string, error)
- func GetSingleFileToUpload(rootPath, targetPath string, flat bool) (utils.Artifact, error)
- func ListFiles(rootPath string, ...) ([]string, error)
- func ListFilesFilterPatternAndSize(rootPath string, ...) ([]string, error)
- func PrepareExcludePathPattern(exclusions []string, patternType utils.PatternType, isRecursive bool) string
- func SearchPatterns(path string, preserveSymlinks, includeDirs bool, regexp *regexp.Regexp) (matches []string, isDir bool, err error)
- type SizeThreshold
- type ThresholdCondition
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 ¶
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 ListFiles ¶ added in v1.25.0
func ListFiles(rootPath string, isRecursive, includeDirs, excludeWithRelativePath, preserveSymlink bool, excludePathPattern string) ([]string, error)
Return all the existing paths of the provided root path
func ListFilesFilterPatternAndSize ¶ added in v1.42.0
func ListFilesFilterPatternAndSize(rootPath string, isRecursive, includeDirs, excludeWithRelativePath, preserveSymlink bool, excludePathPattern string, sizeThreshold *SizeThreshold) ([]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.
Types ¶
type SizeThreshold ¶ added in v1.42.0
type SizeThreshold struct { SizeInBytes int64 Condition ThresholdCondition }
func (SizeThreshold) IsSizeWithinThreshold ¶ added in v1.42.0
func (st SizeThreshold) IsSizeWithinThreshold(actualSizeInBytes int64) bool
type ThresholdCondition ¶ added in v1.42.0
type ThresholdCondition int
ThresholdCondition represents whether the threshold is for files above or below a specified size.
const ( // GreaterThan is greater & equal GreaterEqualThan ThresholdCondition = iota // LessThan is only less LessThan )
Click to show internal directories.
Click to hide internal directories.