Companion

object Companion

Functions

suspend fun cleanupExpiredPacks(context: Context)

Cleans up packs that have been expired for longer than the grace period. This permanently deletes the packs and their files from the disk.

suspend fun createPack(context: Context, region: MTOfflineRegionDefinition, metadataContext: ByteArray? = null): MTOfflinePack

Creates a new offline pack and initializes its on-disk storage and metadata.

Estimates the pack size for a given region definition.

suspend fun hardDeleteOrphanedResources(context: Context)

Hard-deletes all tiles and resources that are no longer referenced by any known offline pack. This can happen if a pack deletion was interrupted or if metadata was corrupted.

suspend fun packs(context: Context): List<MTOfflinePack>

Retrieves all offline packs currently stored on disk. The packs are stably sorted by their creation date (oldest first).

suspend fun removeAll(context: Context)

Deletes all offline packs currently stored on disk.