move method
- @Deprecated('This API will be removed in the next major version. ' 'This API calls Amplify.Storage.copy() to create a copy of the file in the ' 'destination directory and then calls Amplify.Storage.remove() to remove ' 'the source file. ' 'Please use Amplify.Storage.copy() and Amplify.Storage.remove() directly ' 'instead.')
- required StorageItemWithAccessLevel<
StorageItem> source, - required StorageItemWithAccessLevel<
StorageItem> destination, - StorageMoveOptions? options,
Moves source
to destination
with optional StorageMoveOptions,
and returns a StorageMoveOperation.
This API performs two consecutive S3 service calls:
- copy the source object to destination objection
- delete the source object
{@macro amplify_core.amplify_storage_category.copy_source}
Implementation
@Deprecated(
'This API will be removed in the next major version. '
'This API calls Amplify.Storage.copy() to create a copy of the file in the '
'destination directory and then calls Amplify.Storage.remove() to remove '
'the source file. '
'Please use Amplify.Storage.copy() and Amplify.Storage.remove() directly '
'instead.',
)
StorageMoveOperation move({
required StorageItemWithAccessLevel<StorageItem> source,
required StorageItemWithAccessLevel<StorageItem> destination,
StorageMoveOptions? options,
}) {
return identifyCall(
StorageCategoryMethod.move,
() => defaultPlugin.move(
source: source,
destination: destination,
options: options,
),
);
}