archive

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_FILE_PERMISSIONS = 0755
View Source
const ENCRYPTED_FILE_SUFFIX = ".enc"

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(source string, destination string) error

func CopyFile

func CopyFile(source string, destination string) error

Source: https://stackoverflow.com/a/50741908

func DecryptFile

func DecryptFile(sourcePath string, targetPath string, passphrase string) error

func DestinationPath

func DestinationPath(destination string, fallbackFilename string, incrementIfExists bool) (string, error)

func EncryptFile

func EncryptFile(sourcePath string, targetPath string, passphrase string) error

func GetFallbackName

func GetFallbackName(hint string, fallback string, suffix string) string

func IsDir

func IsDir(somePath string) bool

func IsFileEncrypted

func IsFileEncrypted(path string) bool

func UnzipSource

func UnzipSource(source, target string) error

Unzip source: https://stackoverflow.com/a/24792688

func ZipSource

func ZipSource(source []string, target string) error

Types

type Archive

type Archive struct {
	TempLocation string
	IsEncrupted  bool
	// contains filtered or unexported fields
}

func CreateArchiveFromSources

func CreateArchiveFromSources(sources []string, useEncryption bool, passphrase string) (*Archive, error)

func CreateTempArchiveFromRemoteFile

func CreateTempArchiveFromRemoteFile(remoteObjectPath string) (*Archive, error)

func (*Archive) Cleanup

func (a *Archive) Cleanup() error

func (*Archive) CopyIntoDir

func (a *Archive) CopyIntoDir(source string, destination string, useTimedName bool) (string, error)

func (*Archive) Decrypt

func (a *Archive) Decrypt(passphrase string) error

func (*Archive) Destination

func (a *Archive) Destination() string

func (*Archive) Encrypt

func (a *Archive) Encrypt(passphrase string) error

func (*Archive) TempDestination

func (a *Archive) TempDestination() string

func (*Archive) Unzip

func (a *Archive) Unzip() error

func (*Archive) Zip

func (a *Archive) Zip(sources []string) error

Jump to

Keyboard shortcuts

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