Use when asking about 'purge files', 'storage pressure', 'disk space iOS', 'isExcludedFromBackup', 'URL resource values', 'volumeAvailableCapacity', 'low storage', 'file purging priority', 'cache management' - comprehensive reference for iOS storage management and URL resource value APIs
View on GitHubCharlesWiltgen/Axiom
axiom
.claude-plugin/plugins/axiom/skills/axiom-storage-management-ref/SKILL.md
January 16, 2026
Select agents to install to:
npx add-skill https://github.com/CharlesWiltgen/Axiom/blob/main/.claude-plugin/plugins/axiom/skills/axiom-storage-management-ref/SKILL.md -a claude-code --skill axiom-storage-management-refInstallation paths:
.claude/skills/axiom-storage-management-ref/# iOS Storage Management Reference **Purpose**: Comprehensive reference for storage pressure, purging policies, disk space, and URL resource values **Availability**: iOS 5.0+ (basic), iOS 11.0+ (modern capacity APIs) **Context**: Answer to "Does iOS provide any way to mark files as 'purge as last resort'?" ## When to Use This Skill Use this skill when you need to: - Understand iOS file purging behavior - Check available disk space correctly - Set purge priorities for cached files - Exclude files from backup - Monitor storage pressure - Mark files as purgeable - Understand volume capacity APIs - Handle "low storage" scenarios ## The Core Question > **"Does iOS provide any way to mark files as 'purge as last resort'?"** **Answer**: Not directly, but iOS provides two approaches: 1. **Location-based purging** (implicit priority): - `tmp/` → Purged aggressively (anytime) - `Library/Caches/` → Purged under storage pressure - `Documents/`, `Application Support/` → Never purged 2. **Capacity checking** (explicit strategy): - `volumeAvailableCapacityForImportantUsage` — For must-save data - `volumeAvailableCapacityForOpportunisticUsage` — For nice-to-have data - Check before saving, choose location based on available space --- ## URL Resource Values for Storage ### Complete Reference Table | Resource Key | Type | Purpose | Availability | |--------------|------|---------|--------------| | `volumeAvailableCapacityKey` | Int64 | Total available space | iOS 5.0+ | | `volumeAvailableCapacityForImportantUsageKey` | Int64 | Space for essential files | iOS 11.0+ | | `volumeAvailableCapacityForOpportunisticUsageKey` | Int64 | Space for optional files | iOS 11.0+ | | `volumeTotalCapacityKey` | Int64 | Total volume capacity | iOS 5.0+ | | `isExcludedFromBackupKey` | Bool | Exclude from iCloud/iTunes backup | iOS 5.1+ | | `isPurgeableKey` | Bool | System can delete under pressure | iOS 9.0+ | | `fileAllocatedSizeKey` | Int64 | Actual disk space used | iOS 5