util

package
v0.0.0-...-2c89a47 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const DirectoryExtension = ".dir"

Variables

This section is empty.

Functions

func Compress

func Compress(inPath string, tmpDir string) (string, error)

Compress compresses the file inPath using tmpDir fo storing the compressed output file and any intermediate temporary files it might need to create. It returns the full path to the compressed file, or an error.

func Decompress

func Decompress(inPath string, outPath string) error

Decompress decompresses the file inPath to outPath.

func IsObjectCompressed

func IsObjectCompressed(path string) bool

IsObjectCompressed returns true iff path is of a compressed, i.e., contains a .lz4 extension

func IsObjectDirectory

func IsObjectDirectory(path string) bool

IsObjectDirectory returns true iff path is of a directory, i.e., contains a .dir extension

func MustRemoveFile

func MustRemoveFile(path string, logger *zap.Logger)

MustRemoveFile tries to delete the file path from the local file system. On error a message is logged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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