Documentation ¶
Index ¶
- func Archive(path string, w *tar.Writer, exclusions ...string) error
- func CountFiles(path string, exclusions ...string) (count int, err error)
- func Prune(path string, maxFiles int, exemptions ...string) (total int, err error)
- func PruneOld(path string, maxAge int, exemptions ...string) (total int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archive ¶ added in v1.2.0
Archive builds a tar archive of the given path.
We use the `filepath.Walk()` function to go through the entire file tree starting from the path that is passed in. This means we don't have to do a bunch of extra recursive logic for nested directories and having different code paths for files and directories.
func CountFiles ¶ added in v1.2.0
CountFiles walks a directory tree and counts all files present.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.