fileutil

package
v0.0.0-...-5365ff9 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressFile

func CompressFile(filePath string, fileSuffix string, withTime bool) error

CompressFile compresses a file

func CreateFile

func CreateFile(filename string) (*os.File, error)

CreateFile creates a new file in the given path, creating parent directories as necessary

func GenerateFn

func GenerateFn(pattern *strftime.Strftime, clock interface{ Now() time.Time }, rotationTime time.Duration) string

GenerateFn creates a file name based on the pattern, the current time, and the rotation time.

The bsase time that is used to generate the filename is truncated based on the rotation time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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