file

package
v0.1.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZipExtension   = ".zip"
	TarGzExtension = ".tar.gz"
	TgzExtension   = ".tgz"
	GzExtension    = ".gz"
	TarExtension   = ".tar"
)

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies the file from src to dst.

func DeleteDirIfExists

func DeleteDirIfExists(dir string) (err error)

func EnsureDir

func EnsureDir(dir string) error

EnsureDir ensures the directory exists.

func IsFileExists

func IsFileExists(filepath string) (bool, error)

func MergeYAML

func MergeYAML(dst, src []byte) ([]byte, error)

MergeYAML merges two yaml files from src to dst, the src yaml will override dst yaml if the same key exists.

func Uncompress

func Uncompress(file, dst string) error

Uncompress uncompresses the file to the destination directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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