void IProvider.Move(Uri destination, ICredentials credentials) { string bucket; string sourceKey; RegionEndpoint region; this.GetBucketAndKey(out bucket, out sourceKey, out region); using (var client = this.GetClient(credentials, region)) { string destinationKey; AmazonS3Provider.GetBucketAndKey(destination, out bucket, out destinationKey, out region); var request = new CopyObjectRequest { SourceBucket = bucket, DestinationBucket = bucket, SourceKey = sourceKey, DestinationKey = destinationKey }; client.CopyObject(request); this.Delete(credentials); } }
private void GetBucketAndKey(out string bucket, out string key, out RegionEndpoint region) { AmazonS3Provider.GetBucketAndKey(this.Uri, out bucket, out key, out region); }