Amazon.S3.IO.S3FileInfo.ReplaceLocal C# (CSharp) Method

ReplaceLocal() public method

Replaces the content of the destination file on the local file system with the content from this file from S3. If a backup file is specified then the content of the destination file is backup to it.
public ReplaceLocal ( string destinationFileName, string destinationBackupFileName ) : FileInfo
destinationFileName string
destinationBackupFileName string
return System.IO.FileInfo
        public FileInfo ReplaceLocal(string destinationFileName, string destinationBackupFileName)
        {
            if (!string.IsNullOrEmpty(destinationBackupFileName))
            {
                File.Replace(destinationFileName, destinationBackupFileName, null);
            }

            return CopyToLocal(destinationFileName, true);
        }