archive

package
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteContentToZip added in v0.6.0

func WriteContentToZip(zipWriter *zip.Writer, header *zip.FileHeader, content []byte) error

Types

type File added in v0.6.0

type File struct {
	NameOutside string
	NameInside  string
}

type Manager added in v0.6.0

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager added in v0.6.0

func NewManager() *Manager

func (Manager) AddContentAsFile added in v0.6.0

func (m Manager) AddContentAsFile(content string, fileNameInArchive string) error

func (Manager) AddContentAsFileWithModifiedDate added in v0.6.0

func (m Manager) AddContentAsFileWithModifiedDate(content string, fileNameInArchive string, modified time.Time) error

func (Manager) AddFileToArchive added in v0.6.0

func (m Manager) AddFileToArchive(file File) error

func (Manager) AddFilesToArchive added in v0.6.0

func (m Manager) AddFilesToArchive(files []File, closeAfterFinish bool) error

func (Manager) Close added in v0.6.0

func (m Manager) Close() error

func (Manager) GetContent added in v0.6.0

func (m Manager) GetContent() []byte

func (Manager) SaveArchiveAsFile added in v0.6.0

func (m Manager) SaveArchiveAsFile(archivePath string) error

type ZipWriter added in v0.6.0

type ZipWriter interface {
	CreateHeader(fh *zip.FileHeader) (io.Writer, error)
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL