Documentation
¶
Index ¶
- Variables
- func DryRun(ctx context.Context) ([]Entry, []Entry, error)
- func FmtSize(n float64) string
- func Forget(ctx context.Context, pathStr string) (int, error)
- func FormatStatus(s Status) string
- func GuessCategory(ctx context.Context, path string) (string, error)
- func IsSafePath(ctx context.Context, path string) bool
- func Log(ctx context.Context, message string)
- func SaveTracked(ctx context.Context, tracked []Entry) error
- func Track(ctx context.Context, pathStr, category string, silent bool) (bool, error)
- type CategoryTotal
- type Entry
- type KeyError
- type Plugin
- type Status
- type Summary
- type TopItem
Constants ¶
This section is empty.
Variables ¶
var AllowedCategories = map[string]bool{ "temp": true, "test": true, "research": true, "download": true, "chrome-profile": true, "cron-output": true, "other": true}
Allowed tracking categories
Functions ¶
func Forget ¶
Removes a path from tracking without deleting it and returns the number of entries dropped
func FormatStatus ¶
Human readable status table for the slash command
func GuessCategory ¶
Category label for a path, empty when it must not be tracked
func IsSafePath ¶
Accepts only paths under the home or a top level icebath- entry of the resolved tmp root
func SaveTracked ¶
Atomic save through tracked.json.tmp, backing up the old file before the rename
Types ¶
type CategoryTotal ¶
Per category totals in first seen order
type Plugin ¶
type Plugin struct{}
Compiled-in disk-cleanup plugin
type Status ¶
type Status struct {
Categories []CategoryTotal
Top10 []TopItem
TotalTracked int
}
Category breakdown, ten largest existing tracked files and the tracked count