move method

  1. @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<StorageMoveRequest<StorageItem>, StorageMoveResult<StorageItem>> move({
  1. required StorageItemWithAccessLevel<StorageItem> source,
  2. required StorageItemWithAccessLevel<StorageItem> destination,
  3. StorageMoveOptions? options,
})

Moves source to destination with optional StorageMoveOptions, and returns a StorageMoveOperation.

This API performs two consecutive S3 service calls:

  1. copy the source object to destination objection
  2. 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,
    ),
  );
}