Uploads a local file to the FTP server remote directory.
Namespace: Jscape.FtpAssembly: Jscape.Ftp (in Jscape.Ftp.dll) Version: 2.4.5.0
Syntax
C# |
---|
public virtual string UploadUnique( FileInfo localFile ) |
Visual Basic |
---|
Public Overridable Function UploadUnique ( _ localFile As FileInfo _ ) As String |
Visual C++ |
---|
public: virtual String^ UploadUnique( FileInfo^ localFile ) |
Parameters
- localFile
- Type: System.IO..::..FileInfo
The local file (or directory) to upload.
Return Value
Return the remote filename.
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#
Copy

myFtp.UploadUnique("ico_test.gif");

myFtp.UploadUnique("ico_test.gif")
Exceptions
Exception | Condition |
---|---|
Jscape.Ftp..::..FtpException | If an I/O or FTP error occurs. |