files

package
v0.0.0-...-102ad6c Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) error

Copy copies a file to a given destination. It makes sur parent folders are created on the way. Use `-` to copy to stdout.

func CopyFrom

func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error

func Download

func Download(rawURL string, destination string, options Options) error

Download downloads an url to a destination file. Additional headers can be given. This is helpful to pass authentication tokens.

func MkdirAll

func MkdirAll(directory string) error

MkdirAll creates a directory along with any necessary parents.

Types

type ExtractedFile

type ExtractedFile struct {
	Source      string
	Destination string
}

func FindExtractedFile

func FindExtractedFile(name string, files []ExtractedFile) *ExtractedFile

FindExtractedFile find a file to be extracted by its name.

type Options

type Options struct {
	AuthToken            string
	AuthTokenEnvVariable string
	S3AccessKey          string
	S3SecretKey          string
	Sha256               string
}

Jump to

Keyboard shortcuts

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