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

RWFtpPwdReply

Module:  Internet Protocols Module   Package:  FTP


RWFtpPwdReplyRWFtpReplyRWNumReplyRWReply

Local Index

Members

Non-Members

Header File

#include <rw/ftp/RWFtpPwdReply.h>

Description

RWFtpPwdReply is a specialization class of RWFtpReply. RWFtpPwdReply attempts to parse the FTP protocol reply for the current directory information. For instance, the following is a common type of server reply from the PWD command:

257 "/pub" is the current directory

In this reply, 257 is a standardized reply, as defined by the FTP RFC 959. However, the RFC does not include a standard syntax for returning the directory information in the text part of the message. RWFtpPwdReply examines RWNumReplyLine objects contained within self in a last-to-first order, searching for a quoted string. As soon as a match is found, a data member is set to the path. The path can be obtained with the getDirectory() member function.

Although most FTP servers follow this technique, it is not guaranteed because the directory information is returned in the reply text part of the protocol reply. For this reason, failure to parse the directory from the reply does not constitute an error. If the directory name cannot be parsed, the getDirectory() method simply returns an empty string.

Public Constructors

RWFtpPwdReply();
RWFtpPwdReply(const RWFtpPwdReply& reply);

Public Member Operator

RWFtpPwdReply&
operator=(const RWFtpPwdReply& reply);

Public Member Functions

RWCString
getDirectory() const;

Protected Member Functions

virtual void
parse();

Global Operator

ostream&
operator<<(ostream& strm, const RWFtpPwdReply& r); 

NOTE -- This class does not have an extraction (>>) operator.


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.