Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWIFtpAgent


RWIFtpAgentRWIAgent

Module

Networking Tools: Thread-hot Internet Classes (int library)

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Data Types

Member Functions

Synopsis

#include <rw/toolpro/ftpa.h>
RWIFtpAgent agent;
RWIFtpAgent agent("tsunami.roguewave.com", "user",
                  "password");

Required Libraries

thr, net, int, tls (and possibly std)

Description

RWIFtpAgent provides basic FTP file and directory access. It deals with more of the details of the FTP protocol than the RWIFtpClient class. However, it does not provide the flexibility of the RWIFtpClient class.

RWIFtpAgent performs actions in a transaction-based model, rather than the connection-based model of the RWIFtpClient. The methods interact with the server by connecting, performing the requested action, and disconnecting. Multiple transactions can be performed before an RWIFtpAgent object gets destroyed. Finally, the destructor cleans up resources.

RWIFtpAgent objects are lightweight. They are implemented using the interface-implementation pattern. The RWIFtpAgent itself is really 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

RWIFtpAgent();
RWIFtpAgent(const RWCString& host, const RWCString& user,
            const RWCString& password);

Public Member Functions

RWIOUResult<RWIFtpReply>
cd(const RWCString& dirPath);
RWIOUResult<RWBoolean>
dataClose();
RWIOUResult<RWIFtpReply>
del(const RWCString& filePath);
RWIOUResult<RWSocketPortal>
dir(const RWCString& filepath="",
    ConnectMode connMode=PASSIVE);
RWIOUResult<RWSocketPortal>
get(const RWCString& filepath, ConnectMode connMode=PASSIVE, 
    TransferMode transMode=LAST_XFER_MODE);
RWIOUResult<RWIFtpReply>
mkdir(const RWCString& dirName);
RWIOUResult<RWIFtpPwdReply>
pwd();
RWIOUResult<RWSocketPortal>
put(const RWCString& filepath, ConnectMode connMode=PASSIVE,
    TransferMode transMode=LAST_XFER_MODE);
RWIOUResult<RWIFtpReply>
rename(const RWCString& fileFrom, const RWCString& fileTo);
RWIOUResult<RWIFtpReply>
rmdir(const RWCString& dirName);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.