Skip to main content

SCREENSHOT_RETENTION

Constant SCREENSHOT_RETENTION 

Source
const SCREENSHOT_RETENTION: Duration;
Expand description

Delete *.png files in dir older than SCREENSHOT_RETENTION. Called on every UIScreenshot write since this directory only ever grows otherwise (reagent P2, PR #2662) — no background scheduler needed for a directory nothing else writes to. Best-effort: any I/O error for an individual entry (permissions, a concurrent delete, a non-UTF8 name) is skipped rather than failing the screenshot request that triggered it.