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. |
Corresponds almost directly to the protocol's command set.
DotNX::Ftp::Connection::Connection | ( | ) |
Default constructor.
By default log messages are discarded.
DotNX::Ftp::Connection::Connection | ( | ILogger | log | ) |
Constructor.
log | A log message destination. |
override void DotNX::Ftp::Connection::Dispose | ( | bool | disposing | ) | [protected, virtual] |
Implements the IDisposable interface protocol.
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.
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. |
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 | ) |
Reply DotNX::Ftp::Connection::Password | ( | string | password | ) |
Reply DotNX::Ftp::Connection::ChangeWorkDir | ( | string | remotePath | ) |
Sets the remote working directory.
remotePath | The new working directory. |
Reply DotNX::Ftp::Connection::UpWorkDir | ( | ) |
Reply DotNX::Ftp::Connection::GetWorkDir | ( | out string | remotePath | ) |
Returns the remote working directory.
remotePath | On exit, the current remote working directory. |
Reply DotNX::Ftp::Connection::DeleteFile | ( | String | remoteFileName | ) |
Reply DotNX::Ftp::Connection::RenameFile | ( | string | fromRemoteFileName, | |
string | toRemoteFileName | |||
) |
Renames a remote file.
fromRemoteFileName | The original file name. | |
toRemoteFileName | The new file name. |
Reply DotNX::Ftp::Connection::MakeDir | ( | string | directoryName | ) |
Creates a directory on the remote server.
directoryName | The name of the new directory. |
Reply DotNX::Ftp::Connection::RemoveDir | ( | string | directoryName | ) |
Deletes a directory on the remote server.
directoryName | The directory to remove. |
Reply DotNX::Ftp::Connection::ReprType | ( | Representation | repr | ) |
Sets the default representation type.
repr | The new representation type. |
Reply DotNX::Ftp::Connection::NameList | ( | string | dir, | |
out List< string > | list | |||
) |
Lists the files contained in a given directory.
dir | The directory to query. | |
list | On exit, the directory's files. |
Reply DotNX::Ftp::Connection::FileList | ( | string | dir, | |
out List< string > | list | |||
) |
A detailed listing of a remote directory's contents.
dir | The directory to query. | |
list | On exit, A list of string describing the directory's files. |
Reply DotNX::Ftp::Connection::Store | ( | Stream | stream, | |
string | remoteFileName | |||
) |
Outputs a stream to a remote file.
stream | The source stream. | |
remoteFileName | The remote file name. |
Reply DotNX::Ftp::Connection::Retrieve | ( | string | remoteFileName, | |
Stream | stream | |||
) |
Copies a remote file's contents to a stream.
remoteFileName | The remote file. | |
stream | The target stream. |
Reply DotNX::Ftp::Connection::Port | ( | int | portNumber | ) |
Sets the port to be used in the next active connection.
portNumber | The port number. |
Reply DotNX::Ftp::Connection::Passive | ( | out IPEndPoint | ep | ) |
Sets passive mode.
ep | On exit the IP address/port number pair to be used for the data connection. |
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.