CFtpConnection Class
Manages your FTP connection to an Internet server and allows direct manipulation of directories and files on that server.
class CFtpConnection : public CInternetConnection
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CFtpConnection object. |
Public Methods
Name |
Description |
---|---|
Sends a command directly to an FTP server. |
|
Creates a directory on the server. |
|
Gets the current directory for this connection. |
|
Gets the current directory for this connection as a URL. |
|
Gets a file from the connected server |
|
Opens a file on the connected server. |
|
Places a file on the server. |
|
Removes a file from the server. |
|
Removes the specified directory from the server. |
|
Renames a file on the server. |
|
Sets the current FTP directory. |
Remarks
FTP is one of the three Internet services recognized by the MFC WinInet classes.
To communicate with an FTP Internet server, you must first create an instance of CInternetSession, and then create a CFtpConnection object. You never create a CFtpConnection object directly; rather, call CInternetSession::GetFtpConnection, which creates the CFtpConnection object and returns a pointer to it.
To learn more about how CFtpConnection works with the other MFC Internet classes, see the article Internet Programming with WinInet. For more information about communicating with the other two supported services, HTTP and gopher, see the classes CHttpConnection and CGopherConnection.
Example
See the example in the CFtpFileFind class overview.
Inheritance Hierarchy
CFtpConnection
Requirements
Header: afxinet.h