Documentation ¶
Index ¶
- func CleanPatterns(patterns []string) ([]string, [][]string, bool, error)
- func CopyFile(src, dst string) (int64, error)
- func CreateIfNotExists(path string, isDir bool) error
- func GetTotalUsedFds() int
- func Matches(file string, patterns []string) (bool, error)
- func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool, error)
- func ReadSymlinkedDirectory(path string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanPatterns ¶ added in v0.3.1
CleanPatterns takes a slice of patterns returns a new slice of patterns cleaned with filepath.Clean, stripped of any empty patterns and lets the caller know whether the slice contains any exception patterns (prefixed with !).
func CopyFile ¶ added in v0.3.1
CopyFile copies from src to dst until either EOF is reached on src or an error occurs. It verifies src exists and remove the dst if it exists.
func CreateIfNotExists ¶ added in v0.4.0
CreateIfNotExists creates a file or a directory only if it does not already exist.
func GetTotalUsedFds ¶ added in v0.3.1
func GetTotalUsedFds() int
GetTotalUsedFds Returns the number of used File Descriptors by reading it via /proc filesystem.
func Matches ¶
Matches returns true if file matches any of the patterns and isn't excluded by any of the subsequent patterns.
func OptimizedMatches ¶ added in v0.3.1
OptimizedMatches is basically the same as fileutils.Matches() but optimized for archive.go. It will assume that the inputs have been preprocessed and therefore the function doen't need to do as much error checking and clean-up. This was done to avoid repeating these steps on each file being checked during the archive process. The more generic fileutils.Matches() can't make these assumptions.
Types ¶
This section is empty.