system

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MoatTempPatterns = []TempDirPattern{
	{Pattern: "agentops-aws-*", Description: "AWS credential helper directories"},
	{Pattern: "moat-claude-staging-*", Description: "Claude configuration staging directories"},
	{Pattern: "moat-codex-staging-*", Description: "Codex configuration staging directories"},
	{Pattern: "moat-npm-*", Description: "npm credential configuration directories"},
}

MoatTempPatterns lists all temporary directory patterns created by moat

Functions

func CleanOrphanedTempDirs

func CleanOrphanedTempDirs(dirs []OrphanedTempDir, minAge time.Duration) error

CleanOrphanedTempDirs removes the specified orphaned temporary directories Re-verifies age before deletion to prevent race conditions

func FormatSize

func FormatSize(bytes int64) string

FormatSize formats a byte size into a human-readable string

Types

type OrphanedTempDir

type OrphanedTempDir struct {
	Path        string
	Pattern     string
	Description string
	ModTime     time.Time
	Size        int64
}

OrphanedTempDir represents a temporary directory that may be orphaned

func FindOrphanedTempDirs

func FindOrphanedTempDirs(minAge time.Duration) ([]OrphanedTempDir, error)

FindOrphanedTempDirs scans /tmp for moat temporary directories that are likely orphaned

type TempDirPattern

type TempDirPattern struct {
	Pattern     string
	Description string
}

TempDirPattern represents a temporary directory pattern created by moat

Jump to

Keyboard shortcuts

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