Copies this file to the target directory.
            If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.
            
 Declaration Syntax
 Declaration Syntax| C# | 
public S3FileInfo CopyTo( S3DirectoryInfo dir, bool overwrite )
 Parameters
 Parameters- dir (S3DirectoryInfo)
- Target directory where to copy the file to.
- overwrite (Boolean)
- Determines whether the file can be overwritten.
 Return Value
 Return ValueS3FileInfo of the newly copied file.
 Exceptions
 Exceptions| Exception | Condition | 
|---|---|
| ArgumentException | If the directory does not exist. | 
| IOException | If the file already exists in S3 and overwrite is set to false. | 
| WebException | |
| AmazonS3Exception |