Amazon.S3.IO.S3FileInfo.CopyToLocal C# (CSharp) Метод

CopyToLocal() публичный Метод

Copies from S3 to the local file system. If the file already exists on the local file system than an ArgumentException is thrown.
If the file already exists locally.
public CopyToLocal ( string destFileName ) : FileInfo
destFileName string The path where to copy the file to.
Результат System.IO.FileInfo
        public FileInfo CopyToLocal(string destFileName)
        {
            return CopyToLocal(destFileName, false);
        }

Same methods

S3FileInfo::CopyToLocal ( string destFileName, bool overwrite ) : FileInfo

Usage Example

 public void CopyFile(string originalPath, string duplicatePath)
 {
     originalPath = CleanPath(originalPath);
     duplicatePath = CleanPath(duplicatePath);
     var file = new S3FileInfo(_client, _amazonS3StorageConfiguration.AWSFileBucket, originalPath);
     file.CopyToLocal(duplicatePath);
 }