cachegc

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

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

Go to latest
Published: Jun 14, 2024 License: MPL-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(path string, age time.Duration)

Do runs the garbage collector on the given path asynchronously. All files older than age will be cleared.

func IsCacheError

func IsCacheError(err error) bool

IsCacheError returns true if the error happened while caching.

func IsFile

func IsFile(path string) bool

IsFile returns true if the given path exists as a file.

func WithTmp

func WithTmp(dst, pattern string, fn func(path string) error) error

WithTmp gives f a premade tmp file and moves it back atomically.

func WithTmpFile

func WithTmpFile(dst, pattern string, fn func(*os.File) error) error

WithTmpFile gives f a premade tmp os.File and moves it back atomically.

Types

This section is empty.

Jump to

Keyboard shortcuts

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