file

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const RECEIVE_TEMP_FILE_NAME_PREFIX = "portal-receive-temp"
View Source
const SEND_TEMP_FILE_NAME_PREFIX = "portal-send-temp"

Variables

This section is empty.

Functions

func ArchiveAndCompressFiles

func ArchiveAndCompressFiles(files []*os.File) (*os.File, int64, error)

ArchiveAndCompressFiles tars and gzip-compresses files into a temporary file, returning it along with the resulting size

func DecompressAndUnarchiveBytes

func DecompressAndUnarchiveBytes(reader io.Reader) ([]string, int64, error)

DecompressAndUnarchiveBytes gzip-decompresses and un-tars files into the current working directory and returns the names and decompressed size of the created files

func FileSize added in v1.1.0

func FileSize(filePath string) (int64, error)

Traverses a file or directory recursively for total size in bytes.

func ReadFiles

func ReadFiles(fileNames []string) ([]*os.File, error)

func RemoveTemporaryFiles

func RemoveTemporaryFiles(prefix string)

optimistically remove files created by portal with the specified prefix

Types

This section is empty.

Jump to

Keyboard shortcuts

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