Copies this file's content to the file indicated by the S3 bucket and object key.
If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.

C# |
public S3FileInfo CopyTo( string newBucket, string newKey, bool overwrite )

S3FileInfo of the newly copied file.

Exception | Condition |
---|---|
IOException | If the file already exists in S3 and overwrite is set to false. |
ArgumentException | |
WebException | |
AmazonS3Exception |