Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ArchiveTar is a tar ball. ArchiveTar = "tar" // ArchiveTgz is a gzipped tar ball. ArchiveTgz = "tgz" // ArchiveZip is a zip file. ArchiveZip = "zip" // ArchiveUnknown represents an unknown archive type. ArchiveUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func DryRunLength ¶
func DryRunLength( aw ArchiveWriter, files []FileEntry, ) (int64, error)
DryRunLength returns the length of the archive file that would be created if the files were written to the archive.
Types ¶
type ArchiveWriter ¶
type ArchiveWriter interface { WriteHeader(path string, size int64) error Write(b []byte) (int, error) Close() error DryRunEnabled() bool DryRunLength(path string, size int64) (int64, error) DryRunClose() (int64, error) }
ArchiveWriter defines an interface to create an archive file.
func NewArchiveWriter ¶
func NewArchiveWriter(w io.Writer, archiveType ArchiveType) (ArchiveWriter, error)
NewArchiveWriter returns a new ArchiveWriter for archiveType that writes to w.
Click to show internal directories.
Click to hide internal directories.