Rindle.Ops.OrphanReaper (Rindle v0.1.5)

Copy Markdown View Source

Scans a configured temporary directory and cleans up files older than a threshold. Prevents storage bloat from orphaned AV temporary files.

Summary

Functions

Reaps orphan temporary files.

Types

report()

@type report() :: %{
  files_scanned: non_neg_integer(),
  files_deleted: non_neg_integer(),
  errors: non_neg_integer()
}

Functions

reap(opts \\ [])

@spec reap(keyword()) :: report()

Reaps orphan temporary files.

Options

  • :dir - the directory to scan (defaults to Application environment or system tmp)
  • :threshold_sec - files older than this (in seconds) are deleted (defaults to 86400, 24 hours)
  • :dry_run - if true, just reports what would be deleted without actually deleting (default false)