archiver

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package provides archiving functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive(filePaths []string, destinationFile string, compressionLevel int) error

Archive creates a tarball of the files specified in filePaths and saves it to destinationFile You can set the compression level to 0 (no compression) to 9 (best compression)

func ArchiveConcurrent added in v0.0.23

func ArchiveConcurrent(filePaths []string, destinationFile string, numWorkers int) error

ArchiveConcurrent creates a tarball of the files specified in filePaths and saves it to destinationFile

func Extract

func Extract(ArchiveFile string, destinationPath string) ([]string, error)

Extract extracts the contents of an archive file to a destination path

Types

type ArchiveError added in v0.0.23

type ArchiveError struct {
	Message string
	Err     error
}

ArchiveError is an error type for archiving errors

func (*ArchiveError) Error added in v0.0.23

func (e *ArchiveError) Error() string

Error returns the error message

Jump to

Keyboard shortcuts

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