IosStorageUsagePlatformActions

iOS implementation that measures and deletes app-private storage used by the usage screen.

Author

Dmitriy Moroz

Parameters

fileSystem

Shared iOS storage helper that knows the app cache and local model paths.

Constructors

Link copied to clipboard
constructor(fileSystem: IosStorageUsageFileSystem)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun clearAllDownloadedModels()

Deletes every downloaded model directory visible to the platform.

Link copied to clipboard
open suspend override fun clearAppCache()

Deletes app cache files. Callers are responsible for showing confirmation first.

Link copied to clipboard
open suspend override fun getAllDownloadedModelsBytes(): Long

Returns total bytes occupied by every downloaded model directory visible to the platform.

Link copied to clipboard
open suspend override fun getAppCacheBytes(): Long

Returns the current app cache directory size in bytes.

Link copied to clipboard
open suspend override fun getDownloadedModelsBytes(modelIds: List<String>): Long

Returns total bytes occupied by downloaded model directories for modelIds.

Link copied to clipboard
open override fun mapStorageBytesForUi(bytes: Long): Long

Converts a raw storage counter into a user-visible amount.