apply method
Applies the content update.
Attempts to atomically replace the current local content with the downloaded update.
If the updater is in a ready state (ContentUpdaterStatus.fullyReady or ContentUpdaterStatus.partiallyReady)
and canApply is true, this call will perform the swap. For partially ready updates any content that
was not downloaded will be removed when the update is applied.
Returns
- GemError.success: Update applied successfully.
- GemError.upToDate: No changes were required; local content is already up-to-date.
- GemError.invalidated: The update operation has not been started or was invalidated.
- GemError.io: A filesystem error occurred while applying the update.
Implementation
GemError apply() {
final OperationResult resultString = objectMethod(
pointerId,
'ContentUpdater',
'apply',
);
return GemErrorExtension.fromCode(resultString['result']);
}