cleaner

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(path string, dryRun bool) core.DeleteResult

Delete performs the actual file/directory deletion. Returns a DeleteResult recording what happened.

func IsBlacklisted

func IsBlacklisted(path string) bool

IsBlacklisted checks if a path is in the system blacklist. Returns true if the path should NOT be deleted.

Types

type Cleaner

type Cleaner interface {
	Clean(items []core.CleanableItem) []core.DeleteResult
}

Cleaner is the interface for cleanup implementations

type GenericCleaner

type GenericCleaner struct {
	DryRun  bool
	Execute bool
}

GenericCleaner iterates items and deletes them one by one

func NewGenericCleaner

func NewGenericCleaner(dryRun, execute bool) *GenericCleaner

NewGenericCleaner creates a new cleaner

func (*GenericCleaner) Clean

func (g *GenericCleaner) Clean(items []core.CleanableItem) []core.DeleteResult

Clean processes all items and returns deletion results

Jump to

Keyboard shortcuts

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