files

package
v0.0.0-...-50d4516 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirPath

func CheckDirPath(dirPath string) error

CheckDirPath checks whether the provided dirPath points to an existing directory.

func CheckFilePath

func CheckFilePath(filePath string) error

CheckFilePath checks whether the provided filePath points to an existing file.

func MustOverwrite

func MustOverwrite(p string) *os.File

create a file and the parent's folder if necessary. Overwrite the file if it already exists.

func MustRead

func MustRead(path string) *os.File

opens an existing file with read access

Types

type ZipFile

type ZipFile struct {
	*gzip.Writer
	*gzip.Reader
	// contains filtered or unexported fields
}

Wrapper for os.File allowing to close cleanly

func MustReadCompressed

func MustReadCompressed(path string) *ZipFile

Read a .gz archive or panic

func (*ZipFile) Close

func (z *ZipFile) Close() error

Close unzipped file

Jump to

Keyboard shortcuts

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