archive

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToArchive

func AddToArchive(filePath string, archiveName string, removeFiles bool) error

AddToArchive adds the given file into the given archive

func AddToArchiveGzipped

func AddToArchiveGzipped(filePath string, archiveName string, removeFiles bool) (string, error)

AddToArchiveGzipped adds the gzipped version of the given file into the given archive

func DestroyFileInArchive

func DestroyFileInArchive(filePath string, archivePath string) error

DestroyFileInArchive removes the given file from the given archive contents

func FileExists

func FileExists(filePath string) bool

FileExists returns whether given file exists

func GzipFileOrDir

func GzipFileOrDir(filePath string, removeFiles bool) (string, error)

GzipFileOrDir gzips the given file or directory and returns the gzipped name

func IsFile

func IsFile(filePath string) bool

IsFile returns whether the given file is a regular file

func ListArchive

func ListArchive(archiveName string) (string, error)

ListArchive returns a new line separated string of all archive contents recursively.

func ListArchiveTopLevel

func ListArchiveTopLevel(archiveName string) (string, error)

ListArchiveTopLevel returns a new line separated string of archive contents without a parent directory.

func ParseOptions

func ParseOptions()

ParseOptions parses the flags passed and executes the appropriate options.

func PrintHelp added in v0.0.5

func PrintHelp()

PrintHelp prints a help text summarising the functions of flags

func PrintVersion added in v0.0.5

func PrintVersion()

PrintVersion prints the version of archive and a small usage text

func Unarchive

func Unarchive(filePath string, archiveName string, removeFiles bool) error

Unarchive extracts only the given file from the given archive

Types

This section is empty.

Jump to

Keyboard shortcuts

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