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.
final rec = FMTCRoot.recovery;
await rec.recoverableRegions; // List all recoverable regions, and whether each one has failed
await rec.recoverableRegions.failedOnly; // List all failed downloads
await stats.getRecoverableRegion(); // Retrieve a specific recoverable region by ID
await stats.cancel(); // Safely remove the specified recoverable regionRestoring Usable Regions
Once a RecoveredRegion has been retreived, it can be converted to a standard region:
either a
DownloadableRegion, usingtoDownloadableThestarttile will be adjusted from the original to reflect the progress of the download before it failed, meaning that tiles already successfully cached (excluding buffered) will not be downloaded again, saving time and data! Theendtile will be either the original, or the maximum number of tiles normally in the region (which will have no resulting difference thannull, but allows for a quick estimate of the number of remaining tiles to be made without needing to recheckthe entire region).or a
BaseRegion(with the correct subtype), usingtoRegion
Last updated
Was this helpful?