unarchive

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportedArchive added in v1.7.2

func IsSupportedArchive(filePath string) bool

Types

type Unarchiver

type Unarchiver struct {
	BypassInspection bool
	StripComponents  int
}

func (*Unarchiver) Unarchive

func (u *Unarchiver) Unarchive(archivePath, archiveName, destinationPath string) error

The 'archiver' dependency includes an API called 'Unarchive' to extract archive files. This API uses the archive file extension to determine the archive type. We therefore need to use the file name as it was in Artifactory, and not the file name which was downloaded. To achieve this, we added a new implementation of the 'Unarchive' func and use it instead of the default one. archivePath - Absolute or relative path to the archive, without the file name archiveName - The archive file name destinationPath - The extraction destination directory

Jump to

Keyboard shortcuts

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