Documentation
¶
Overview ¶
Package rules defines the data model for scannable/cleanable disk items and the OS-aware catalog that classifies them. It has no terminal dependency so a GUI can reuse it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanMethod ¶
type CleanMethod int
CleanMethod is how an item is reclaimed.
const ( Remove CleanMethod // rm -rf Trash // move to OS trash Command // run Item.Command instead of deleting a path )
type Entry ¶
type Entry struct {
PathTemplate string
Label string
Category Category
Tier Tier
Method CleanMethod
Command []string
}
Entry is a catalog rule. PathTemplate uses "~" for the home dir.
type Item ¶
type Item struct {
Path string
Label string
Bytes int64
Category Category
Tier Tier
Method CleanMethod
Command []string
Source Source
}
Item is one scannable/cleanable thing.
func ClassifyHeuristic ¶
ClassifyHeuristic classifies a path discovered by the heuristic walk that the catalog did not already cover. Default: user data, treated as a large file.
func (Item) EffectiveMethod ¶
func (i Item) EffectiveMethod() CleanMethod
EffectiveMethod resolves the method, deriving from Tier when unset.
func (Item) Selectable ¶
Selectable reports whether the user may select this item for cleaning.
Click to show internal directories.
Click to hide internal directories.