Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internet Protocols Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWFtpAgent

Module:  Internet Protocols Module   Package:  FTP


RWFtpAgentRWAgent

Local Index

Members

Header File

#include <rw/ftp/RWFtpAgent.h>

Description

RWFtpAgent provides basic FTP file and directory access. It handles more of the details of the FTP protocol than the RWFtpClient class, but does not have as much flexibility.

RWFtpAgent performs actions in a transaction-based model (in contrast with the connection-based model of the RWFtpClient). The methods interact with the server by connecting, performing the requested action, and disconnecting. Multiple transactions can be performed before an RWFtpAgent object gets destroyed. The destructor cleans up resources.

RWFtpAgent objects are lightweight. They are implemented using the interface-implementation idiom. RWFtpAgent itself is a handle to an implementation that performs the protocol interaction.

Example

Program Output:

Public Enums

enum TransferMode { tmode_ascii,tmode_binary,tmode_latest };
enum ConnectMode { cmode_active, cmode_passive };

Public Constructors

RWFtpAgent();
RWFtpAgent(const RWSockAddrBase& address, 
                 const RWCString& user,
           const RWCString& password);

Public Member Functions

RWTIOUResult<RWSocketPortal>
append(const RWCString& filepath, ConnectMode connMode =
       RWFtpAgent::cmode_passive, TransferMode transMode =
       RWFtpAgent::tmode_latest);
RWTIOUResult<RWFtpReply>
cd(const RWCString& dirPath);
RWTIOUResult<bool>
dataClose();
RWTIOUResult<RWFtpReply>
del(const RWCString& filePath);
RWTIOUResult<RWSocketPortal>
dir(const RWCString& filepath="",
    ConnectMode connMode=RWFtpAgent::cmode_passive);
RWTIOUResult<RWSocketPortal>
get(const RWCString& filepath, 
ConnectMode connMode=WFtpAgent::cmode_passive, TransferMode transMode=RWFtpAgent::tmode_latest);
unsigned long
getTimeout(void) const;
RWTIOUResult<RWFtpReply>
mkdir(const RWCString& dirName);
RWTIOUResult<RWFtpPwdReply>
pwd();
RWTIOUResult<RWSocketPortal>
put(const RWCString& filepath, 
ConnectMode connMode = RWFtpAgent::cmode_passive, TransferMode transMode = RWFtpAgent::tmode_latest);
RWTIOUResult<RWFtpReply>
rename(const RWCString& fileFrom, const RWCString& fileTo);
RWTIOUResult<RWFtpReply>
rmdir(const RWCString& dirName);
void
setTimeout(unsigned long timeout);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.