edtFTPnet/Free - Open-source FTP component for .NET | Download

FTPConnectionUploadFile(String, String) Method

Upload a local file to the FTP server in the current working directory.

Definition

Namespace: EnterpriseDT.Net.Ftp
Assembly: edtFTPnet (in edtFTPnet.dll) Version: 2.2.3.0
C#
public virtual void UploadFile(
	string localPath,
	string remoteFile
)

Parameters

localPath  String
Path of the local file.
remoteFile  String
Name of remote file in current working directory.

Remarks

The stream is closed after the transfer is complete if CloseStreamsAfterTransfer is true (the default) and are left open otherwise. If the stream is left open the its position will be at the end of the stream. Use Seek(Int64, SeekOrigin) to change the position if required.

See Also