filecleanup

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileCleanup

func FileCleanup(pattern string, options ...FileCleanerOption) error

Types

type CleanupFiles

type CleanupFiles []string

func (CleanupFiles) Len

func (f CleanupFiles) Len() int

func (CleanupFiles) Less

func (f CleanupFiles) Less(i, j int) bool

func (CleanupFiles) Swap

func (f CleanupFiles) Swap(i, j int)

type EmptyFileCleanerOption

type EmptyFileCleanerOption struct{}

EmptyFileCleanerOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type FileCleaner

type FileCleaner struct {
	// contains filtered or unexported fields
}

func (*FileCleaner) ApplyOptions

func (o *FileCleaner) ApplyOptions(options ...FileCleanerOption) *FileCleaner

type FileCleanerOption

type FileCleanerOption interface {
	// contains filtered or unexported methods
}

A FileCleanerOption sets options.

func WithMaxAge

func WithMaxAge(maxAge time.Duration) FileCleanerOption

func WithMaxCount

func WithMaxCount(maxCount int64) FileCleanerOption

type FileCleanerOptionFunc

type FileCleanerOptionFunc func(*FileCleaner)

FileCleanerOptionFunc wraps a function that modifies Client into an implementation of the FileCleanerOption interface.

Jump to

Keyboard shortcuts

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