2005/5/9

     
 

class FTPClient

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::net::ftp::FTPClient Class Reference

#include <FTPClient.h>

Inheritance diagram for acdk::net::ftp::FTPClient:

acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Public Member Functions

 FTPClient ()
RString toString ()
 return a string representation of this object Object::toString() return getName() by default

void connect (IN(RString) host, int port)
void login (IN(RString) user, IN(RString) pass)
RStringArray listFiles ()
::acdk::io::RFileInfoArray listFileInfos ()
RString dirList (IN(RString) cmd=LIST-aL)
RString getCwd ()
void mkdir (IN(RString) dirname)
void sendFile (IN(RFile) localFile, IN(RString) remoteName)
void receiveFile (IN(RString) remoteName, IN(RFile) localFile)
void deleteFile (IN(RString) remoteName)
void deleteDirectory (IN(RString) remoteName)
void rename (IN(RString) fromName, IN(RString) toName)
bool setCwd (IN(RString) newDir)
 return true if new dir is set

bool setCwdUp ()
 return true if parent directory was entered

void passiveMode ()
void blockMode ()
void setFtpTransferType (FtpType type)
void sendCommand (IN(RString) cmd)
acdk::io::RWriter getRemoteFileWriter (IN(RString) remoteName)
 return a file writer to remote file.

void closeRemoteFileWriter ()
acdk::io::RReader getRemoteFileReader (IN(RString) remoteName)
void closeRemoteFileReader ()

Protected Member Functions

void ensureDataChannel ()
void resetDataChannel ()
void getFeatures ()
void checkState (int posmask=FtpClientReady, int negmask=FtpClientInProcess|FtpClientInSend|FtpClientInReceive)
 throws IOException if not FtpClientReady or FtpClientInProcess

RString readResponse (OUT(int) code, int *expectedCode=0)
RString readDataAsciiResponse (bool withCmdResponse=true)

Private Attributes

RSocket _commandChannel
RSocket _dataChannel
::acdk::io::RCharReader _cmdReader
::acdk::io::RCharWriter _cmdWriter
FtpMode _ftpMode
RString _serverDataAddress
int _serverDataPort
RString _pwd
FtpType _ftpType
int _clientState

Constructor & Destructor Documentation

acdk::net::ftp::FTPClient::FTPClient  )  [inline]
 


Member Function Documentation

void acdk::net::ftp::FTPClient::blockMode  ) 
 

void acdk::net::ftp::FTPClient::checkState int  posmask = FtpClientReady,
int  negmask = FtpClientInProcess|FtpClientInSend|FtpClientInReceive
[protected]
 

throws IOException if not FtpClientReady or FtpClientInProcess

void acdk::net::ftp::FTPClient::closeRemoteFileReader  ) 
 

See also:
getRemoteFileReader

void acdk::net::ftp::FTPClient::closeRemoteFileWriter  ) 
 

See also:
getRemoteFileWriter

void acdk::net::ftp::FTPClient::connect IN(RString host,
int  port
 

void acdk::net::ftp::FTPClient::deleteDirectory IN(RString remoteName  ) 
 

void acdk::net::ftp::FTPClient::deleteFile IN(RString remoteName  ) 
 

RString acdk::net::ftp::FTPClient::dirList IN(RString cmd = LIST-aL  ) 
 

void acdk::net::ftp::FTPClient::ensureDataChannel  )  [protected]
 

RString acdk::net::ftp::FTPClient::getCwd  ) 
 

void acdk::net::ftp::FTPClient::getFeatures  )  [protected]
 

acdk::io::RReader acdk::net::ftp::FTPClient::getRemoteFileReader IN(RString remoteName  ) 
 

See also:
getRemoteFileWriter

acdk::io::RWriter acdk::net::ftp::FTPClient::getRemoteFileWriter IN(RString remoteName  ) 
 

return a file writer to remote file.

has to be closed via closeRemoteFileWriter() No other ftp command are allowed between getRemoteFileWriter and closeRemoteFileWriter

::acdk::io::RFileInfoArray acdk::net::ftp::FTPClient::listFileInfos  ) 
 

RStringArray acdk::net::ftp::FTPClient::listFiles  ) 
 

void acdk::net::ftp::FTPClient::login IN(RString user,
IN(RString pass
 

void acdk::net::ftp::FTPClient::mkdir IN(RString dirname  ) 
 

void acdk::net::ftp::FTPClient::passiveMode  ) 
 

RString acdk::net::ftp::FTPClient::readDataAsciiResponse bool  withCmdResponse = true  )  [protected]
 

RString acdk::net::ftp::FTPClient::readResponse OUT(int)  code,
int *  expectedCode = 0
[protected]
 

void acdk::net::ftp::FTPClient::receiveFile IN(RString remoteName,
IN(RFile localFile
 

void acdk::net::ftp::FTPClient::rename IN(RString fromName,
IN(RString toName
 

void acdk::net::ftp::FTPClient::resetDataChannel  )  [protected]
 

void acdk::net::ftp::FTPClient::sendCommand IN(RString cmd  ) 
 

void acdk::net::ftp::FTPClient::sendFile IN(RFile localFile,
IN(RString remoteName
 

bool acdk::net::ftp::FTPClient::setCwd IN(RString newDir  ) 
 

return true if new dir is set

bool acdk::net::ftp::FTPClient::setCwdUp  ) 
 

return true if parent directory was entered

void acdk::net::ftp::FTPClient::setFtpTransferType FtpType  type  ) 
 

RString acdk::net::ftp::FTPClient::toString  )  [virtual]
 

return a string representation of this object Object::toString() return getName() by default

Reimplemented from acdk::lang::Object.


Member Data Documentation

int acdk::net::ftp::FTPClient::_clientState [private]
 

::acdk::io::RCharReader acdk::net::ftp::FTPClient::_cmdReader [private]
 

::acdk::io::RCharWriter acdk::net::ftp::FTPClient::_cmdWriter [private]
 

RSocket acdk::net::ftp::FTPClient::_commandChannel [private]
 

RSocket acdk::net::ftp::FTPClient::_dataChannel [private]
 

FtpMode acdk::net::ftp::FTPClient::_ftpMode [private]
 

FtpType acdk::net::ftp::FTPClient::_ftpType [private]
 

RString acdk::net::ftp::FTPClient::_pwd [private]
 

RString acdk::net::ftp::FTPClient::_serverDataAddress [private]
 

int acdk::net::ftp::FTPClient::_serverDataPort [private]