DotNX::Ftp::Connection Class Reference

Lower level library interface. More...

Inheritance diagram for DotNX::Ftp::Connection:

DotNX::Core::DisposableBase

List of all members.

Public Member Functions

 Connection ()
 Default constructor.
 Connection (ILogger log)
 Constructor.
Reply Open (string srvHost, int srvPort)
 Opens a connection to the specified server.
Reply Open (string srvHost)
void Close ()
 Closes the connection and releases the associated resources.
Reply User (string user)
 Sets the remote user.
Reply Password (string password)
 Performs authentication.
Reply ChangeWorkDir (string remotePath)
 Sets the remote working directory.
Reply UpWorkDir ()
 Sets the remote working directory to the one above the current one.
Reply GetWorkDir (out string remotePath)
 Returns the remote working directory.
Reply DeleteFile (String remoteFileName)
 Deletes the specified remote file.
Reply RenameFile (string fromRemoteFileName, string toRemoteFileName)
 Renames a remote file.
Reply MakeDir (string directoryName)
 Creates a directory on the remote server.
Reply RemoveDir (string directoryName)
 Deletes a directory on the remote server.
Reply ReprType (Representation repr)
 Sets the default representation type.
Reply NameList (string dir, out List< string > list)
 Lists the files contained in a given directory.
Reply FileList (string dir, out List< string > list)
 A detailed listing of a remote directory's contents.
Reply Store (Stream stream, string remoteFileName)
 Outputs a stream to a remote file.
Reply Retrieve (string remoteFileName, Stream stream)
 Copies a remote file's contents to a stream.
Reply Port (int portNumber)
 Sets the port to be used in the next active connection.
Reply Passive (out IPEndPoint ep)
 Sets passive mode.

Protected Member Functions

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

Properties

bool Connected [get]
 Indicates whether there's an active connection.
TransferMode Mode [get, set]
 Sets or gets the default transfer mode.


Detailed Description

Lower level library interface.

Corresponds almost directly to the protocol's command set.


Constructor & Destructor Documentation

DotNX::Ftp::Connection::Connection (  ) 

Default constructor.

By default log messages are discarded.

DotNX::Ftp::Connection::Connection ( ILogger  log  ) 

Constructor.

Parameters:
log A log message destination.


Member Function Documentation

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

Implements the IDisposable interface protocol.

Parameters:
disposing When true managed resources are disposed.

Implements DotNX::Core::DisposableBase.

Reply DotNX::Ftp::Connection::Open ( string  srvHost,
int  srvPort 
)

Opens a connection to the specified server.

Parameters:
srvHost The host's name or IP address.
srvPort The port on which to open the connection. If unspecified the standard FTP port will be used.
Returns:
A Reply indicating whether the command was successful.

Reply DotNX::Ftp::Connection::Open ( string  srvHost  ) 

void DotNX::Ftp::Connection::Close (  ) 

Closes the connection and releases the associated resources.

Reply DotNX::Ftp::Connection::User ( string  user  ) 

Sets the remote user.

Parameters:
user The remote user id.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::Password ( string  password  ) 

Performs authentication.

Parameters:
password The current user's password.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::ChangeWorkDir ( string  remotePath  ) 

Sets the remote working directory.

Parameters:
remotePath The new working directory.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::UpWorkDir (  ) 

Sets the remote working directory to the one above the current one.

Returns:
A Reply.

Reply DotNX::Ftp::Connection::GetWorkDir ( out string  remotePath  ) 

Returns the remote working directory.

Parameters:
remotePath On exit, the current remote working directory.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::DeleteFile ( String  remoteFileName  ) 

Deletes the specified remote file.

Parameters:
remoteFileName The file to delete.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::RenameFile ( string  fromRemoteFileName,
string  toRemoteFileName 
)

Renames a remote file.

Parameters:
fromRemoteFileName The original file name.
toRemoteFileName The new file name.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::MakeDir ( string  directoryName  ) 

Creates a directory on the remote server.

Parameters:
directoryName The name of the new directory.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::RemoveDir ( string  directoryName  ) 

Deletes a directory on the remote server.

Parameters:
directoryName The directory to remove.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::ReprType ( Representation  repr  ) 

Sets the default representation type.

Parameters:
repr The new representation type.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::NameList ( string  dir,
out List< string >  list 
)

Lists the files contained in a given directory.

Parameters:
dir The directory to query.
list On exit, the directory's files.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::FileList ( string  dir,
out List< string >  list 
)

A detailed listing of a remote directory's contents.

Parameters:
dir The directory to query.
list On exit, A list of string describing the directory's files.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::Store ( Stream  stream,
string  remoteFileName 
)

Outputs a stream to a remote file.

Parameters:
stream The source stream.
remoteFileName The remote file name.
Returns:

Reply DotNX::Ftp::Connection::Retrieve ( string  remoteFileName,
Stream  stream 
)

Copies a remote file's contents to a stream.

Parameters:
remoteFileName The remote file.
stream The target stream.
Returns:

Reply DotNX::Ftp::Connection::Port ( int  portNumber  ) 

Sets the port to be used in the next active connection.

Parameters:
portNumber The port number.
Returns:
A Reply.

Reply DotNX::Ftp::Connection::Passive ( out IPEndPoint  ep  ) 

Sets passive mode.

Parameters:
ep On exit the IP address/port number pair to be used for the data connection.
Returns:
A Reply.


Property Documentation

bool DotNX::Ftp::Connection::Connected [get]

Indicates whether there's an active connection.

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

Sets or gets the default 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