DotNX::Ftp::Client Class Reference

Higher level library interface. More...

Inheritance diagram for DotNX::Ftp::Client:

DotNX::Core::DisposableBase

List of all members.

Public Member Functions

 Client ()
 Default Constructor.
 Client (ILogger log)
 Constructor.
 Client (string server, int srvPort, string user, string password, ILogger log)
 Constructor.
 Client (string server, string user, string password)
 Client (string server, int srvPort, string user, string password)
 Client (string server, string user, string password, ILogger log)
Connection GetConnection ()
 Returns the underlying connection.
void Open (string server, int srvPort, string user, string password)
 Opens a connection to the specified FTP server.
void Open (string server, string user, string password)
void Close ()
 Closes the currently open connection.
void Ascii ()
 Sets the file transfer representation mode to ASCII.
string GetCurrentDir ()
 Returns the server's current directory.
void SetCurrentDir (string dir)
 Sets the server's current directory.
void UpCurrentDir ()
 Moves the server's current directory up one level in the file system's hyerarchy.
List< string > ListDir ()
 Returns a list of files contained in the server's current directory.
List< string > ListDir (string dir)
 Returns a list of files contained in the specified server's directory.
List< string > ListDirEx ()
 TODO: Comment!
List< string > ListDirEx (string dir)
void SendStream (Stream stream, string remoteFileName, Representation repr)
 Copies a stream's content to a remote file using the specified representation mode.
void SendStream (Stream stream, string remoteFileName)
void RecvStream (string remoteFileName, Stream stream, Representation repr)
 Copies a remote file to a local stream, using the specified representation mode.
void RecvStream (string remoteFileName, Stream stream)
void SendFile (string localFileName, Representation repr)
 Copies a local file to the remote server's current directory, with the same name.
void SendFile (string localFileName)
void SendFile (string localFileName, string remoteFileName, Representation repr)
 Copies a local file to the remote server's current directory, with the specified name.
void SendFile (string localFileName, string remoteFileName)
void RecvFile (string remoteFileName, Representation repr)
 Copies a remote file to the local system, with the same name.
void RecvFile (string remoteFileName)
void RecvFile (string remoteFileName, string localFileName, Representation repr)
 Copies a remote file to the local system, with the specified name.
void RecvFile (string remoteFileName, string localFileName)
void MoveFile (string remoteFileName, string toRemotePath)
 Moves a remote file to the specified remote path.
void DeleteFile (String remoteFileName)
 Removes a remote file.
void RenameFile (string fromRemoteFileName, string toRemoteFileName)
 Changes the name of a remote file.
void MakeDir (string directoryName)
 Creates the secified directory on the remote server.
void RemoveDir (string directoryName)
 Removes a directory on the remote server.
void ReprType (Representation repr)
 Sets the default representation mode.

Protected Member Functions

override void Dispose (bool disposing)
 Implements the IDisposable interface protocol.

Properties

TransferMode Mode [get, set]
 Sets the connection's transfer mode.


Detailed Description

Higher level library interface.

Corresponds more or less to the kind of interface usually provided by interactive FTP programs.


Constructor & Destructor Documentation

DotNX::Ftp::Client::Client (  ) 

Default Constructor.

Disables logging.

DotNX::Ftp::Client::Client ( ILogger  log  ) 

Constructor.

Parameters:
log A log message destination.

DotNX::Ftp::Client::Client ( string  server,
int  srvPort,
string  user,
string  password,
ILogger  log 
)

Constructor.

This and the following ones also open a connection to a specified server.

Parameters:
server The hostname or IP address of an FTP server.
srvPort the IP port to be used by the server.
user The username to use for the connection.
password The user's password.
log A logging destination.

DotNX::Ftp::Client::Client ( string  server,
string  user,
string  password 
)

DotNX::Ftp::Client::Client ( string  server,
int  srvPort,
string  user,
string  password 
)

DotNX::Ftp::Client::Client ( string  server,
string  user,
string  password,
ILogger  log 
)


Member Function Documentation

override void DotNX::Ftp::Client::Dispose ( bool  disposing  )  [protected, virtual]

Implements the IDisposable interface protocol.

Parameters:
disposing When true managed resources are disposed.

Implements DotNX::Core::DisposableBase.

Connection DotNX::Ftp::Client::GetConnection (  ) 

Returns the underlying connection.

Returns:
the connection.

void DotNX::Ftp::Client::Open ( string  server,
int  srvPort,
string  user,
string  password 
)

Opens a connection to the specified FTP server.

Parameters:
server The server's hostname or IP address.
srvPort The server's IP port.
user The username to be used for authentication.
password The user's password.

void DotNX::Ftp::Client::Open ( string  server,
string  user,
string  password 
)

void DotNX::Ftp::Client::Close (  ) 

Closes the currently open connection.

void DotNX::Ftp::Client::Ascii (  ) 

Sets the file transfer representation mode to ASCII.

string DotNX::Ftp::Client::GetCurrentDir (  ) 

Returns the server's current directory.

Returns:
The server's current directory.

void DotNX::Ftp::Client::SetCurrentDir ( string  dir  ) 

Sets the server's current directory.

Parameters:
dir The directory to be set.

void DotNX::Ftp::Client::UpCurrentDir (  ) 

Moves the server's current directory up one level in the file system's hyerarchy.

List<string> DotNX::Ftp::Client::ListDir (  ) 

Returns a list of files contained in the server's current directory.

Returns:
The server's current directory's content.

List<string> DotNX::Ftp::Client::ListDir ( string  dir  ) 

Returns a list of files contained in the specified server's directory.

Parameters:
dir A directory on the server.
Returns:
The specified directory's contents.

List<string> DotNX::Ftp::Client::ListDirEx (  ) 

TODO: Comment!

Returns:

List<string> DotNX::Ftp::Client::ListDirEx ( string  dir  ) 

void DotNX::Ftp::Client::SendStream ( Stream  stream,
string  remoteFileName,
Representation  repr 
)

Copies a stream's content to a remote file using the specified representation mode.

Parameters:
stream The source stream.
remoteFileName The remote destination file.
repr The representation mode to be used for the transfer.

void DotNX::Ftp::Client::SendStream ( Stream  stream,
string  remoteFileName 
)

void DotNX::Ftp::Client::RecvStream ( string  remoteFileName,
Stream  stream,
Representation  repr 
)

Copies a remote file to a local stream, using the specified representation mode.

Parameters:
remoteFileName The remote source file.
stream The destination stream.
repr The representation mode to be used for the transfer.

void DotNX::Ftp::Client::RecvStream ( string  remoteFileName,
Stream  stream 
)

void DotNX::Ftp::Client::SendFile ( string  localFileName,
Representation  repr 
)

Copies a local file to the remote server's current directory, with the same name.

Parameters:
localFileName The name of the file to be copied.
repr The representation mode to be used for the transfer.

void DotNX::Ftp::Client::SendFile ( string  localFileName  ) 

void DotNX::Ftp::Client::SendFile ( string  localFileName,
string  remoteFileName,
Representation  repr 
)

Copies a local file to the remote server's current directory, with the specified name.

Parameters:
localFileName The name of the file to be copied.
remoteFileName The destination file name.
repr The representation mode to be used for the transfer.

void DotNX::Ftp::Client::SendFile ( string  localFileName,
string  remoteFileName 
)

void DotNX::Ftp::Client::RecvFile ( string  remoteFileName,
Representation  repr 
)

Copies a remote file to the local system, with the same name.

Parameters:
remoteFileName The remote file name.
repr The representation mode to be used for the transfer.

void DotNX::Ftp::Client::RecvFile ( string  remoteFileName  ) 

void DotNX::Ftp::Client::RecvFile ( string  remoteFileName,
string  localFileName,
Representation  repr 
)

Copies a remote file to the local system, with the specified name.

Parameters:
remoteFileName The remote source file name.
localFileName The local destination file name.
repr The representation mode to be used for the transfer.

void DotNX::Ftp::Client::RecvFile ( string  remoteFileName,
string  localFileName 
)

void DotNX::Ftp::Client::MoveFile ( string  remoteFileName,
string  toRemotePath 
)

Moves a remote file to the specified remote path.

Parameters:
remoteFileName The remote file name.
toRemotePath The remote destination path.

void DotNX::Ftp::Client::DeleteFile ( String  remoteFileName  ) 

Removes a remote file.

Parameters:
remoteFileName The remote file name.

void DotNX::Ftp::Client::RenameFile ( string  fromRemoteFileName,
string  toRemoteFileName 
)

Changes the name of a remote file.

Parameters:
fromRemoteFileName The remote source file name.
toRemoteFileName The remote destination file name.

void DotNX::Ftp::Client::MakeDir ( string  directoryName  ) 

Creates the secified directory on the remote server.

Parameters:
directoryName The directory to create.

void DotNX::Ftp::Client::RemoveDir ( string  directoryName  ) 

Removes a directory on the remote server.

Parameters:
directoryName The directory to remove.

void DotNX::Ftp::Client::ReprType ( Representation  repr  ) 

Sets the default representation mode.

Parameters:
repr The new default representation.


Property Documentation

TransferMode DotNX::Ftp::Client::Mode [get, set]

Sets the connection's transfer mode.


The documentation for this class was generated from the following file:

SourceForge.net Logo
Generated on Sat Oct 18 14:13:26 2008 for .Nick's 0.1.0 by  doxygen 1.5.7.1