Recovery

RootRecovery, accessed via FMTCRoot.recovery, allows access to the bulk download recovery system, which is designed to allow rescue (salvation and restarting) of failed downloads when they crashed due to an unexpected event.

// List all recoverable regions, and whether each one has failed
await FMTCRoot.recovery.recoverableRegions; 
// List all failed downloads
await FMTCRoot.recovery.recoverableRegions.failedOnly; 
// Retrieve a specific recoverable region by ID
await FMTCRoot.recovery.getRecoverableRegion();
// Safely remove the specified recoverable region
await FMTCRoot.recovery.cancel(); 

RecoveredRegion

RecoveredRegions are wrappers containing recovery & some downloadable region information, around a DownloadableRegion.

Once a RecoveredRegion has been retreived, it contains the original BaseRegion in the region property.

To create a DownloadableRegion using the other available information with a provided TileLayer, use toDownloadable.

Last updated

Was this helpful?