Documentation ¶
Overview ¶
Package archiver provides a service to archive part of the filesystem into tar archive
Index ¶
Constants ¶
View Source
const OSPathSeparator = string(os.PathSeparator)
OSPathSeparator is the string version of the os.PathSeparator
Variables ¶
This section is empty.
Functions ¶
func Tar ¶
Tar creates .tar archive and writes it to output for every item in paths channel
nolint: gocyclo
Types ¶
type FileItem ¶
type FileItem struct { FullPath string RelPath string FileInfo os.FileInfo Link string Error error }
FileItem is unit of work for archive
type WalkerOption ¶
type WalkerOption func(*walkerOptions)
WalkerOption configures Walker.
func WithMaxRecurseDepth ¶
func WithMaxRecurseDepth(maxDepth int) WalkerOption
WithMaxRecurseDepth controls maximum recursion depth while walking file tree.
Value of -1 disables depth control
func WithSkipRoot ¶
func WithSkipRoot() WalkerOption
WithSkipRoot skips root path if it's a directory.
Click to show internal directories.
Click to hide internal directories.