archive

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Directory

func Directory(ctx context.Context, sourcePath, targetPath string) (string, error)

Directory creates an archive from the files in the provided source path. The archive is created at the target path. The function returns the path to the created archive and any error encountered.

func Extract

func Extract(ctx context.Context, r io.Reader, outDir string) error

Extract extracts the files from the provided reader into the specified output directory. The function returns any error encountered.

func IsArchive

func IsArchive(path string) bool

IsArchive checks if the provided path is an archive file. It returns true if the file has the archive file extension, false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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