pub async fn copy(
config: Config,
client: HttpClient,
source: impl Into<Location<'_>>,
destination: impl Into<Location<'_>>,
cancel: CancellationToken,
events: Option<Sender<TransferEvent>>,
) -> Result<()>Expand description
Copies a source location to a destination location.
A location may either be a local path or a remote URL.
If provided, the events sender will be used to send transfer events.
Note: copying between two remote locations is not supported.
§Azure Blob Storage
Supported remote URLs for Azure Blob Storage:
azschemed URLs in the formataz://<account>/<container>/<blob>.httpsschemed URLs in the formathttps://<account>.blob.core.windows.net/<container>/<blob>.
If authentication is required, the URL is expected to contain a SAS token in its query parameters.
§Amazon S3
Supported remote URLs for S3 Storage:
s3schemed URLs in the format:s3://<bucket>/<object>(note: uses the default region).httpsschemed URLs in the formathttps://<bucket>.s3.<region>.amazonaws.com/<object>.httpsschemed URLs in the formathttps://<region>.s3.amazonaws.com/<bucket>/<object>.
If authentication is required, the provided Config must have S3
authentication information.
§Google Cloud Storage
Supported remote URLs for Google Cloud Storage:
gsschemed URLs in the format:gs://<bucket>/<object>.httpsschemed URLs in the formathttps://<bucket>.storage.googleapis.com/<object>.httpsschemed URLs in the formathttps://storage.googleapis.com/<bucket>/<object>.
If authentication is required, the provided Config must have Google
authentication information.
Note that HMAC authentication is used for Google Cloud Storage access.