fileutil

package
v1.222.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

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

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

func GenerateFileNme added in v1.16.0

func GenerateFileNme(path string, name string, suffix string, clock interface{ Now() time.Time }) string

产生新的文件名(用于按大小分割文件)

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.

func GenerateFnForFileSize added in v1.1.0

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

产生新的文件名(用于按大小分割文件)

Types

This section is empty.

Jump to

Keyboard shortcuts

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