cleaner

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(scanDirectory string, opts ...Option) error

func CleanPeriodically

func CleanPeriodically(
	ctx context.Context,
	scanDirectory string,
	interval time.Duration,
	opts ...Option,
)

func Scan

func Scan(
	scanDirectory string,
	opts ...Option,
) (queueForDeletion []string, queueForRenaming []string, err error)

Types

type Option

type Option func(*Options)

func WithDryRun

func WithDryRun() Option

func WithEligibleAge

func WithEligibleAge(d time.Duration) Option

WithEligibleAge sets the minimum time since the modtime of the file to be deleted.

func WithoutProbe

func WithoutProbe() Option

type Options

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

Jump to

Keyboard shortcuts

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