FtpClient.CopyFileAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copy file
public virtual System.Threading.Tasks.Task<Azure.Connectors.Sdk.Ftp.Models.BlobMetadata> CopyFileAsync(string sourceUrl, string destinationFilePath, bool? overwrite = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CopyFileAsync : string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Connectors.Sdk.Ftp.Models.BlobMetadata>
override this.CopyFileAsync : string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Connectors.Sdk.Ftp.Models.BlobMetadata>
Public Overridable Function CopyFileAsync (sourceUrl As String, destinationFilePath As String, Optional overwrite As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of BlobMetadata)
Parameters
- sourceUrl
- String
Source url
- destinationFilePath
- String
Destination file path
- cancellationToken
- CancellationToken
Cancellation token.
Returns
The Copy file response.
Remarks
This operation copies a file to an FTP server. If a file is being deleted/renamed on server right after it was copied, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming newly created file.