Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

FTPSocket Class Reference

This class represents a FTP-client to be used in c++-programms. ftp access stream class. More...

#include <ftp.h>

List of all members.

Public Types

typedef set< DirEntry, DirEntry::CompareDirType
 set of direntries


Public Member Functions

void sendCommand (string cmd)
 low level functions

int getResponse (string *resp=0)
 FTPSocket ()
 empty constructor

 FTPSocket (InetHostAddress host, timeout_t to=0)
 constructor; connects to a host on creation

 FTPSocket (InetHostAddress host, string user, string passwd, timeout_t to=0)
 constructor; connects to a host and logs in

 ~FTPSocket ()
 destructor; logs out and disconnects if needed

void setAscii ()
 set ascii-mode for datatransfer

void setEbcdic ()
 set ebcdic-mode for datatransfer

void setBinary ()
 set binary-mode for datatransfer

string command (string cmd)
 process a ftp-command

void open (InetHostAddress host, timeout_t to=0)
 sessionmanagement

void open (InetHostAddress host, string user, string passwd, timeout_t to=0)
 creates a connection to host and logs in

void login (string user, string passwd)
 logs in to a host; connection must be set up

void close (void)
 log out

void quit (void)
 close connection

DirType getDir (string dir="", timeout_t to=0)
 get directory

string pwd (void)
 get current working directory on the server

void cwd (string dir)
 change current working directory on the server

void cdup (void)
 change current working directory

void put (string file, string rfilename, timeout_t to=0)
 send local file to remote

void put (string file, timeout_t to=0)
 send local file to remote; local and remote filenames are identical

void get (string file, string lfilename, timeout_t to=0)
 get file from server

void get (string file, timeout_t to=0)
 get file from server; local and remote filenames are identical

void remove (string file)
 delete file from server

void rename (string from, string to)
 rename file on server

void mkdir (string dir)
 create directory on server

void rmdir (string dir)
 remove directory on server


Static Public Member Functions

void setDebug (int d=1)
 enable debugging

int getDebug ()
 queries debugging


Protected Attributes

TCPStreamcs

Static Protected Attributes

int debug

Friends

class oftpstream
class iftpstream


Detailed Description

This class represents a FTP-client to be used in c++-programms. ftp access stream class.

It is based on the CommonC++-Framework.

Author:
Dr. Eckhardt and Partner GmbH


Member Typedef Documentation

typedef set<DirEntry, DirEntry::Compare> FTPSocket::DirType
 

set of direntries


Constructor & Destructor Documentation

FTPSocket::FTPSocket  ) 
 

empty constructor

FTPSocket::FTPSocket InetHostAddress  host,
timeout_t  to = 0
[explicit]
 

constructor; connects to a host on creation

FTPSocket::FTPSocket InetHostAddress  host,
string  user,
string  passwd,
timeout_t  to = 0
 

constructor; connects to a host and logs in

FTPSocket::~FTPSocket  ) 
 

destructor; logs out and disconnects if needed


Member Function Documentation

void FTPSocket::cdup void   ) 
 

change current working directory

void FTPSocket::close void   ) 
 

log out

string FTPSocket::command string  cmd  ) 
 

process a ftp-command

void FTPSocket::cwd string  dir  ) 
 

change current working directory on the server

void FTPSocket::get string  file,
timeout_t  to = 0
[inline]
 

get file from server; local and remote filenames are identical

void FTPSocket::get string  file,
string  lfilename,
timeout_t  to = 0
 

get file from server

int FTPSocket::getDebug  )  [inline, static]
 

queries debugging

DirType FTPSocket::getDir string  dir = "",
timeout_t  to = 0
 

get directory

int FTPSocket::getResponse string *  resp = 0  ) 
 

void FTPSocket::login string  user,
string  passwd
 

logs in to a host; connection must be set up

void FTPSocket::mkdir string  dir  ) 
 

create directory on server

void FTPSocket::open InetHostAddress  host,
string  user,
string  passwd,
timeout_t  to = 0
 

creates a connection to host and logs in

void FTPSocket::open InetHostAddress  host,
timeout_t  to = 0
 

sessionmanagement

creates a connection to host

void FTPSocket::put string  file,
timeout_t  to = 0
[inline]
 

send local file to remote; local and remote filenames are identical

void FTPSocket::put string  file,
string  rfilename,
timeout_t  to = 0
 

send local file to remote

string FTPSocket::pwd void   ) 
 

get current working directory on the server

void FTPSocket::quit void   ) 
 

close connection

void FTPSocket::remove string  file  ) 
 

delete file from server

void FTPSocket::rename string  from,
string  to
 

rename file on server

void FTPSocket::rmdir string  dir  ) 
 

remove directory on server

void FTPSocket::sendCommand string  cmd  ) 
 

low level functions

void FTPSocket::setAscii  ) 
 

set ascii-mode for datatransfer

void FTPSocket::setBinary  ) 
 

set binary-mode for datatransfer

void FTPSocket::setDebug int  d = 1  )  [inline, static]
 

enable debugging

void FTPSocket::setEbcdic  ) 
 

set ebcdic-mode for datatransfer


Friends And Related Function Documentation

friend class iftpstream [friend]
 

friend class oftpstream [friend]
 


Member Data Documentation

TCPStream* FTPSocket::cs [protected]
 

int FTPSocket::debug [static, protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Sep 25 13:14:32 2003 for GNU CommonC++ by doxygen 1.3.3