Skip to content

Class: cFTPTransfer

Properties | Events | Methods | Index of Classes

Implements FTP client-side operations

Hierarchy

cObject > InetTransfer > cFTPTransfer

Show full hierarchy and direct subclasses

Library: Common Class Library

Description

The cFtpTransfer class implements FTP client-side operations.

To communicate with an Internet/intranet FTP server, you must first create an object of this class, and then set the psRemoteHost property to the fully qualified domain name, or the IP address, of the FTP server. If your network requires traffic to go through a proxy server, you should also set the psProxy property to the protocol for the proxy server, and the fully qualified domain name or IP address of that proxy server. Unless the remote FTP server listens to port 21 (default), you also have to set the piRemotePort property to the specified port number. Then just call the Connect function to connect to the FTP server.

It is typical for FTP sites to require the use of passive mode (see pbPassiveMode). You can also use peTransferFlags to set specific transfer settings.

Check LastErrorCode to check for errors after an operation.