Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZipArchive ¶
type ZipArchive struct {
// contains filtered or unexported fields
}
ZipArchive is a struct to create zip archive for given files and directories via Add(). Close() must be called after all files are added successfully.
func NewZipArchive ¶
func NewZipArchive(dest io.Writer) *ZipArchive
NewZipArchive returns a new ZipArchive.
func (*ZipArchive) Add ¶
Add creates a zip header from info and adds the file to the zip archive. If given path is a directory, it will be added as a directory and src will be ignored.
func (*ZipArchive) Close ¶
func (za *ZipArchive) Close() error
Close closes the zip archive to flush the contents and finalize the zip file.
Click to show internal directories.
Click to hide internal directories.