Export (0) Print
Expand All

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

Name

Description

CFtpConnection::CFtpConnection

Constructs a CFtpConnection object.

Name

Description

CFtpConnection::Command

Sends a command directly to an FTP server.

CFtpConnection::CreateDirectory

Creates a directory on the server.

CFtpConnection::GetCurrentDirectory

Gets the current directory for this connection.

CFtpConnection::GetCurrentDirectoryAsURL

Gets the current directory for this connection as a URL.

CFtpConnection::GetFile

Gets a file from the connected server

CFtpConnection::OpenFile

Opens a file on the connected server.

CFtpConnection::PutFile

Places a file on the server.

CFtpConnection::Remove

Removes a file from the server.

CFtpConnection::RemoveDirectory

Removes the specified directory from the server.

CFtpConnection::Rename

Renames a file on the server.

CFtpConnection::SetCurrentDirectory

Sets the current FTP directory.

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.

See the example in the CFtpFileFind class overview.

Header: afxinet.h

Show:
© 2014 Microsoft