Uploads a local file to the FTP server remote directory.

Namespace: Jscape.Ftp
Assembly: Jscape.Ftp (in Jscape.Ftp.dll) Version: 2.4.5.0

Syntax

C#
public virtual void Upload(
	string localFile,
	bool append
)
Visual Basic
Public Overridable Sub Upload ( _
	localFile As String, _
	append As Boolean _
)
Visual C++
public:
virtual void Upload(
	String^ localFile, 
	bool append
)

Parameters

localFile
Type: System..::..String
The local file (or directory) to upload.
append
Type: System..::..Boolean
true to append to the remote file on the FTP server, false otherwise.

Remarks

If the local file is a directory then the directory and all the contents are uploaded relative to the remote directory.

Examples

The following example uploads the ico_test.gif file from the local directory to the remote directory on the FTP server.
CopyC#
myFtp.Upload("ico_test.gif", false);

Copy 
myFtp.Upload("ico_test.gif", False)

Exceptions

ExceptionCondition
Jscape.Ftp..::..FtpExceptionIf an I/O or FTP error occurs.

See Also