C# Класс _3PA.Lib.Ftp.FtpsClient

Class used to connect to an FTP/FTPS server. The main goal of this class is to provide a complete and easy to use FTP client connection, implementing SSL/TLS extension and providing tested compatibility to the main FTP server products. Implemented RFCs: 959, 2228, 2389, 2428, 2640, 3659, 4217. Not all commands described in the above RFCs are implemented at the current stage.
Requirements: MS Framework 2.0 and above or Mono 2.0 and above.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AppeCmd void
AuthCmd void
CallTransferCallback void
CccCmd void
CdupCmd void
CheckCommandInjection void
CheckConnection void
CheckFeature bool
CheckSslAlgorithmsStrength void
CheckSymLinks void
ClntCmd void
CloseCtrlConnection void
CloseDataConnection void
CombineRemotePath string
CreateSSlStream System.Net.Security.SslStream
CwdCmd void
DeleCmd void
EndStreamCommand FtpStream
EnsureDir void
EpsvCmd void
FeatCmd IList
GetCtrlConnAddressFamily AddressFamily
GetDataStream Stream
GetDataString string
GetFeaturesFromServer void
GetFiles void
GetRegexPattern string
GetReply FtpReply
GetUniquePath string
HandleCmd FtpReply
HandleCmd FtpReply
KeepAliveThreadFunc void
LangCmd void
ListCmd void
MdtmCmd System.DateTime
MkdCmd void
NlstCmd void
NoopCmd void
OptsCmd void
ParseEpsvReply System.Net.IPEndPoint
ParseFtpDateTime System.DateTime
ParsePasvReply System.Net.IPEndPoint
ParsePwdReply string
ParseStouReply string
PassCmd string
PasvCmd void
PbszCmd void
PortCmd void
ProtCmd void
PwdCmd string
QuitCmd void
RetrCmd void
RmdCmd void
RnfrCmd void
RntoCmd void
SSlCtrlChannelCheckRevertToClearText void
SendFile ulong
SetDataClientTimeout void
SetSslInfo void
SetupActiveDataConnectionStep1 int
SetupActiveDataConnectionStep2 void
SetupCtrlConnection void
SetupCtrlStreamReaderAndWriter void
SetupDataConnection void
SetupPassiveDataConnection void
SizeCmd ulong
SslControlChannelCheckExplicitEncryptionRequest void
SslDataChannelCheckExplicitEncryptionRequest void
SslDataChannelImplicitEncryptionRequest void
StopActiveDataConnListener void
StorCmd void
StouCmd void
SwitchCtrlToClearMode void
SwitchCtrlToSslMode void
SystCmd string
TypeCmd void
UserCmd bool
ValidateServerCertificate bool

Открытые методы

Метод Описание
AppendFile ( string remoteFileName ) : FtpStream
AppendFile ( string localFileName, string remoteFileName ) : ulong

AppendFile overload to easily transfer a file from local to remote

AppendFile ( string localFileName, string remoteFileName, FileTransferCallback transferCallback ) : ulong

AppendFile overload to easily transfer a file from local to remote

ChangeToUpperDir ( ) : void

Changes the remote directory to the parent directory.

Close ( ) : void

Closes the current connection, freeing resources.

Connect ( string hostname ) : string

Anonymous authentication

Connect ( string hostname, EsslSupportMode sslSupportMode ) : string

Anonymous authentication

Connect ( string hostname, NetworkCredential credential ) : string
Connect ( string hostname, NetworkCredential credential, EsslSupportMode sslSupportMode ) : string
Connect ( string hostname, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate ) : string
Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, int sslMinKeyExchangeAlgStrength, int sslMinCipherAlgStrength, int sslMinHashAlgStrength, int timeout ) : string

Connects to a FTP server using the provided parameters. The default representation tipe is set to Binary. The text encoding is set to UTF8, if supported by the server via the FEAT command.

Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, int sslMinKeyExchangeAlgStrength, int sslMinCipherAlgStrength, int sslMinHashAlgStrength, int timeout, bool useCtrlEndPointAddressForData ) : string

Connects to a FTP server using the provided parameters. The default representation tipe is set to Binary. The text encoding is set to UTF8, if supported by the server via the FEAT command.

Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, int sslMinKeyExchangeAlgStrength, int sslMinCipherAlgStrength, int sslMinHashAlgStrength, int timeout, bool useCtrlEndPointAddressForData, EDataConnectionMode dataConnectionMode ) : string

Connects to a FTP server using the provided parameters. The default representation tipe is set to Binary. The text encoding is set to UTF8, if supported by the server via the FEAT command.

Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, int timeout ) : string
DeleteFile ( string remoteFileName ) : void

Deletes the given remote file.

Dispose ( ) : void
GetCurrentDirectory ( ) : string
GetDirectoryList ( ) : IList
GetDirectoryList ( string remoteDirName ) : IList

Returns a list of the contents form the given directory. A parsing is performed on the data returned fronm the LIST command.

Please use GetShortDirectoryList(string) or GetDirectoryListUnparsed(string) in case of parsing errors, as the contents returned from FTP servers may differ from the common DOS and UNIX formats adopted here.

GetDirectoryListUnparsed ( ) : string
GetDirectoryListUnparsed ( string remoteDirName ) : string

returns the given directory list data as returned from the server, without parsing its contents.

GetFeatures ( ) : IList

Features returned from the FEAT command

GetFile ( string remoteFileName ) : FtpStream

Retrieves the given file from the server. A FtpStream is returned, to be read until the end of file. See the GetFile(string, string) overload to easily save the stream to a local file.

GetFile ( string remoteFileName, string localFileName ) : ulong

GetFile overload to easily transfer a file from remote to local

GetFile ( string remoteFileName, string localFileName, FileTransferCallback transferCallback ) : ulong

GetFile overload to easily transfer a file from remote to local

GetFileModificationTime ( string remoteFileName ) : DateTime?

Returns the modification time of the given remote file or null if the MDTM feature is not supported by the server.

GetFileTransferSize ( string remoteFileName ) : ulong?

Remote transfer file size returned by the SIZE command.

GetFiles ( string localDirectoryName ) : void

Transfers all files from the current remote directory without recursion

GetFiles ( string localDirectoryName, bool recursive ) : void

Transfers all files from the current remote directory. Optionally recursive

GetFiles ( string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive ) : void

Transfers all files, matching the given pattern, from the current remote directory. Optionally recursive

GetFiles ( string remoteDirectoryName, string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive, FileTransferCallback transferCallback ) : void

Transfers all files, matching the given pattern, from the given remote directory. Optionally recursive

GetShortDirectoryList ( ) : IList
GetShortDirectoryList ( string remoteDirName ) : IList

Returns an array of file names and directories contained in the given directory. Please use GetShortDirectoryList(string) or GetDirectoryListUnparsed(string) for more detailed directory information.

GetSystem ( ) : string

Returns some remote system information, as returned from the SYST command.

MakeDir ( string remoteDirName, bool recursive = false ) : void

Creates the given remote directory.

PopCurrentDirectory ( ) : string

Restores the current directory. For details please see PushCurrentDirectory. Throws an exception if the stack is empty.

PushCurrentDirectory ( ) : string

Pushes the current remote directory on a stack, in order to easily restore it later calling PopCurrentDirectory.

PutFile ( string remoteFileName ) : FtpStream

Stores a remote file, returning a FtpStream to be used for writing the file contents. Call FtpStream.Close on the stream once done. See the PutFile(string, string) overload to easily transfer the contents of a local file.

PutFile ( string localFileName, string remoteFileName ) : ulong

PutFile overload to easily transfer a file from local to remote

PutFile ( string localFileName, string remoteFileName, FileTransferCallback transferCallback ) : ulong

PutFile overload to easily transfer a file from local to remote

PutFiles ( string localDirectoryName ) : void

Transfers all files to the current remote directory without recursion

PutFiles ( string localDirectoryName, bool recursive ) : void

Transfers all files to the current remote directory. Optionally recursive

PutFiles ( string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive ) : void

Transfers all files, matching the given pattern, to the current remote directory. Optionally recursive

PutFiles ( string localDirectoryName, string remoteDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive, FileTransferCallback transferCallback ) : void

PutUniqueFile ( string &remoteFileName ) : FtpStream
PutUniqueFile ( string localFileName, string &remoteFileName ) : ulong

PutUniqueFile overload to easily transfer a file from local to remote

PutUniqueFile ( string localFileName, string &remoteFileName, FileTransferCallback transferCallback ) : ulong

PutUniqueFile overload to easily transfer a file from local to remote.

RemoveDir ( string remoteDirName ) : void

Removes the given remote directory.

RenameFile ( string remoteFileNameFrom, string remoteFileNameTo ) : void

Renames the given remote file.

SendCustomCommand ( string command ) : FtpReply

Sends the given FTP command text to the server.

In case of return codes >= 400 an exception is thrown.

SetCurrentDirectory ( string remoteDirName ) : void

Changes the remote current directory.

SetLanguage ( string ietfLanguageTag ) : void

Set the language used by the server during the current connection. Please check the features returned by GetFeatues for a list of available languages supported by the server.

SetTextEncoding ( ETextEncoding textEncoding ) : void

Set the given text encoding.

SetTransferMode ( ETransferMode transferMode ) : void

Set the representation type according to the given parameter

StartKeepAlive ( ) : void

Issues NOOP commands periodically in a separated thread

StopKeepAlive ( ) : void

Stops the keep alive thread

Приватные методы

Метод Описание
AppeCmd ( string fileName ) : void
AuthCmd ( EAuthMechanism authMech ) : void
CallTransferCallback ( FileTransferCallback transferCallback, ETransferActions transferAction, string localObjectName, string remoteObjectName, ulong fileTransmittedBytes, ulong fileTransferSize ) : void
CccCmd ( ) : void
CdupCmd ( ) : void
CheckCommandInjection ( string command ) : void

Basic injection check

CheckConnection ( ) : void
CheckFeature ( string feature ) : bool
CheckSslAlgorithmsStrength ( SslStream sslStream ) : void
CheckSymLinks ( string remoteDirectoryName, IList dirList ) : void

Workaround needed because it is not possible to determine if a symlink is a directory or a file based on the UNIX style directory listing.

ClntCmd ( string name ) : void
CloseCtrlConnection ( ) : void
CloseDataConnection ( ) : void
CombineRemotePath ( string path1, string path2 ) : string

Works like Path.Combine(...), but without replacing the "/" separator with Path.DirectorySeparatorChar

CreateSSlStream ( Stream s, bool leaveInnerStreamOpen ) : SslStream
CwdCmd ( string dirName ) : void
DeleCmd ( string fileName ) : void
EndStreamCommand ( FtpStream allowedOp ) : FtpStream
EnsureDir ( string remoteDirectoryName, FileTransferCallback transferCallback ) : void

Check if the given directory exists and create it if it doesn't.

EpsvCmd ( ) : void
FeatCmd ( ) : IList
GetCtrlConnAddressFamily ( ) : AddressFamily
GetDataStream ( ) : Stream
GetDataString ( ) : string
GetFeaturesFromServer ( ) : void
GetFiles ( string remoteDirectoryName, string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive, FileTransferCallback transferCallback, IList paths ) : void
GetRegexPattern ( string filePattern, EPatternStyle patternStyle ) : string
GetReply ( ) : FtpReply
GetUniquePath ( IList paths, string localFilePath ) : string
HandleCmd ( string command ) : FtpReply
HandleCmd ( string command, bool waitForAnswer ) : FtpReply
KeepAliveThreadFunc ( ) : void
LangCmd ( string ietfLanguageTag ) : void

ListCmd ( string dirName ) : void
MdtmCmd ( string fileName ) : System.DateTime
MkdCmd ( string dirName ) : void
NlstCmd ( string dirName ) : void
NoopCmd ( ) : void
OptsCmd ( string command ) : void
ParseEpsvReply ( FtpReply reply ) : IPEndPoint
ParseFtpDateTime ( string message ) : System.DateTime
ParsePasvReply ( FtpReply reply ) : IPEndPoint
ParsePwdReply ( FtpReply reply ) : string
ParseStouReply ( FtpReply reply ) : string
PassCmd ( string password ) : string

PasvCmd ( ) : void
PbszCmd ( uint maxSize ) : void
PortCmd ( ) : void
ProtCmd ( EProtCode protCode ) : void
PwdCmd ( ) : string
QuitCmd ( bool waitForAnswer ) : void
RetrCmd ( string fileName ) : void
RmdCmd ( string dirName ) : void
RnfrCmd ( string fileOldName ) : void
RntoCmd ( string fileNewName ) : void
SSlCtrlChannelCheckRevertToClearText ( ) : void
SendFile ( string localFileName, string remoteFileName, Stream s, FileTransferCallback transferCallback ) : ulong
SetDataClientTimeout ( ) : void
SetSslInfo ( SslStream sslStream ) : void

Copies the protocol information form the given stream.

SetupActiveDataConnectionStep1 ( ) : int
SetupActiveDataConnectionStep2 ( ) : void
SetupCtrlConnection ( string hostname, int port, Encoding textEncoding ) : void
SetupCtrlStreamReaderAndWriter ( Stream s ) : void
SetupDataConnection ( ) : void
SetupPassiveDataConnection ( IPEndPoint dataEndPoint ) : void
SizeCmd ( string fileName ) : ulong
SslControlChannelCheckExplicitEncryptionRequest ( EsslSupportMode sslSupportMode ) : void
SslDataChannelCheckExplicitEncryptionRequest ( ) : void
SslDataChannelImplicitEncryptionRequest ( ) : void
StopActiveDataConnListener ( ) : void
StorCmd ( string fileName ) : void
StouCmd ( string &fileName ) : void
SwitchCtrlToClearMode ( ) : void
SwitchCtrlToSslMode ( ) : void
SystCmd ( ) : string
TypeCmd ( ERepType repType, string param2 ) : void
UserCmd ( string userName ) : bool

ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Описание методов

AppendFile() публичный Метод

public AppendFile ( string remoteFileName ) : FtpStream
remoteFileName string
Результат FtpStream

AppendFile() публичный Метод

AppendFile overload to easily transfer a file from local to remote
public AppendFile ( string localFileName, string remoteFileName ) : ulong
localFileName string
remoteFileName string
Результат ulong

AppendFile() публичный Метод

AppendFile overload to easily transfer a file from local to remote
public AppendFile ( string localFileName, string remoteFileName, FileTransferCallback transferCallback ) : ulong
localFileName string
remoteFileName string
transferCallback FileTransferCallback
Результат ulong

ChangeToUpperDir() публичный Метод

Changes the remote directory to the parent directory.
public ChangeToUpperDir ( ) : void
Результат void

Close() публичный Метод

Closes the current connection, freeing resources.
public Close ( ) : void
Результат void

Connect() публичный Метод

Anonymous authentication
public Connect ( string hostname ) : string
hostname string
Результат string

Connect() публичный Метод

Anonymous authentication
public Connect ( string hostname, EsslSupportMode sslSupportMode ) : string
hostname string
sslSupportMode EsslSupportMode
Результат string

Connect() публичный Метод

public Connect ( string hostname, NetworkCredential credential ) : string
hostname string
credential System.Net.NetworkCredential
Результат string

Connect() публичный Метод

public Connect ( string hostname, NetworkCredential credential, EsslSupportMode sslSupportMode ) : string
hostname string
credential System.Net.NetworkCredential
sslSupportMode EsslSupportMode
Результат string

Connect() публичный Метод

public Connect ( string hostname, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate ) : string
hostname string
credential System.Net.NetworkCredential
sslSupportMode EsslSupportMode
userValidateServerCertificate RemoteCertificateValidationCallback
Результат string

Connect() публичный Метод

Connects to a FTP server using the provided parameters. The default representation tipe is set to Binary. The text encoding is set to UTF8, if supported by the server via the FEAT command.
public Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, int sslMinKeyExchangeAlgStrength, int sslMinCipherAlgStrength, int sslMinHashAlgStrength, int timeout ) : string
hostname string
port int
credential System.Net.NetworkCredential
sslSupportMode EsslSupportMode
userValidateServerCertificate RemoteCertificateValidationCallback
x509ClientCert System.Security.Cryptography.X509Certificates.X509Certificate
sslMinKeyExchangeAlgStrength int
sslMinCipherAlgStrength int
sslMinHashAlgStrength int
timeout int Connection timeout in ms. null can be specifiad to keep the default value of 120s.
Результат string

Connect() публичный Метод

Connects to a FTP server using the provided parameters. The default representation tipe is set to Binary. The text encoding is set to UTF8, if supported by the server via the FEAT command.
public Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, int sslMinKeyExchangeAlgStrength, int sslMinCipherAlgStrength, int sslMinHashAlgStrength, int timeout, bool useCtrlEndPointAddressForData ) : string
hostname string
port int
credential System.Net.NetworkCredential
sslSupportMode EsslSupportMode
userValidateServerCertificate RemoteCertificateValidationCallback
x509ClientCert System.Security.Cryptography.X509Certificates.X509Certificate
sslMinKeyExchangeAlgStrength int
sslMinCipherAlgStrength int
sslMinHashAlgStrength int
timeout int Connection timeout in ms. null can be specifiad to keep the default value of 120s.
useCtrlEndPointAddressForData bool true to use the control channel remote address for data connections instead of the address returned by PASV
Результат string

Connect() публичный Метод

Connects to a FTP server using the provided parameters. The default representation tipe is set to Binary. The text encoding is set to UTF8, if supported by the server via the FEAT command.
public Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, int sslMinKeyExchangeAlgStrength, int sslMinCipherAlgStrength, int sslMinHashAlgStrength, int timeout, bool useCtrlEndPointAddressForData, EDataConnectionMode dataConnectionMode ) : string
hostname string
port int
credential System.Net.NetworkCredential
sslSupportMode EsslSupportMode
userValidateServerCertificate RemoteCertificateValidationCallback
x509ClientCert System.Security.Cryptography.X509Certificates.X509Certificate
sslMinKeyExchangeAlgStrength int
sslMinCipherAlgStrength int
sslMinHashAlgStrength int
timeout int Connection timeout in ms. null can be specifiad to keep the default value of 120s.
useCtrlEndPointAddressForData bool true to use the control channel remote address for data connections instead of the address returned by PASV
dataConnectionMode EDataConnectionMode Active or Passive data connection mode
Результат string

Connect() публичный Метод

public Connect ( string hostname, int port, NetworkCredential credential, EsslSupportMode sslSupportMode, int timeout ) : string
hostname string
port int
credential System.Net.NetworkCredential
sslSupportMode EsslSupportMode
timeout int
Результат string

DeleteFile() публичный Метод

Deletes the given remote file.
public DeleteFile ( string remoteFileName ) : void
remoteFileName string
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GetCurrentDirectory() публичный Метод

public GetCurrentDirectory ( ) : string
Результат string

GetDirectoryList() публичный Метод

public GetDirectoryList ( ) : IList
Результат IList

GetDirectoryList() публичный Метод

Returns a list of the contents form the given directory. A parsing is performed on the data returned fronm the LIST command.
Please use GetShortDirectoryList(string) or GetDirectoryListUnparsed(string) in case of parsing errors, as the contents returned from FTP servers may differ from the common DOS and UNIX formats adopted here.
public GetDirectoryList ( string remoteDirName ) : IList
remoteDirName string
Результат IList

GetDirectoryListUnparsed() публичный Метод

public GetDirectoryListUnparsed ( ) : string
Результат string

GetDirectoryListUnparsed() публичный Метод

returns the given directory list data as returned from the server, without parsing its contents.
public GetDirectoryListUnparsed ( string remoteDirName ) : string
remoteDirName string
Результат string

GetFeatures() публичный Метод

Features returned from the FEAT command
public GetFeatures ( ) : IList
Результат IList

GetFile() публичный Метод

Retrieves the given file from the server. A FtpStream is returned, to be read until the end of file. See the GetFile(string, string) overload to easily save the stream to a local file.
public GetFile ( string remoteFileName ) : FtpStream
remoteFileName string
Результат FtpStream

GetFile() публичный Метод

GetFile overload to easily transfer a file from remote to local
public GetFile ( string remoteFileName, string localFileName ) : ulong
remoteFileName string
localFileName string
Результат ulong

GetFile() публичный Метод

GetFile overload to easily transfer a file from remote to local
public GetFile ( string remoteFileName, string localFileName, FileTransferCallback transferCallback ) : ulong
remoteFileName string
localFileName string
transferCallback FileTransferCallback
Результат ulong

GetFileModificationTime() публичный Метод

Returns the modification time of the given remote file or null if the MDTM feature is not supported by the server.
public GetFileModificationTime ( string remoteFileName ) : DateTime?
remoteFileName string
Результат DateTime?

GetFileTransferSize() публичный Метод

Remote transfer file size returned by the SIZE command.
public GetFileTransferSize ( string remoteFileName ) : ulong?
remoteFileName string
Результат ulong?

GetFiles() публичный Метод

Transfers all files from the current remote directory without recursion
public GetFiles ( string localDirectoryName ) : void
localDirectoryName string
Результат void

GetFiles() публичный Метод

Transfers all files from the current remote directory. Optionally recursive
public GetFiles ( string localDirectoryName, bool recursive ) : void
localDirectoryName string
recursive bool
Результат void

GetFiles() публичный Метод

Transfers all files, matching the given pattern, from the current remote directory. Optionally recursive
public GetFiles ( string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive ) : void
localDirectoryName string
filePattern string
patternStyle EPatternStyle
recursive bool
Результат void

GetFiles() публичный Метод

Transfers all files, matching the given pattern, from the given remote directory. Optionally recursive
public GetFiles ( string remoteDirectoryName, string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive, FileTransferCallback transferCallback ) : void
remoteDirectoryName string Absolute or relative remote path, null indicates the current directory
localDirectoryName string Absolute local path
filePattern string May be null to transfer all files
patternStyle EPatternStyle
recursive bool
transferCallback FileTransferCallback
Результат void

GetShortDirectoryList() публичный Метод

public GetShortDirectoryList ( ) : IList
Результат IList

GetShortDirectoryList() публичный Метод

Returns an array of file names and directories contained in the given directory. Please use GetShortDirectoryList(string) or GetDirectoryListUnparsed(string) for more detailed directory information.
public GetShortDirectoryList ( string remoteDirName ) : IList
remoteDirName string
Результат IList

GetSystem() публичный Метод

Returns some remote system information, as returned from the SYST command.
public GetSystem ( ) : string
Результат string

MakeDir() публичный Метод

Creates the given remote directory.
public MakeDir ( string remoteDirName, bool recursive = false ) : void
remoteDirName string
recursive bool
Результат void

PopCurrentDirectory() публичный Метод

Restores the current directory. For details please see PushCurrentDirectory. Throws an exception if the stack is empty.
public PopCurrentDirectory ( ) : string
Результат string

PushCurrentDirectory() публичный Метод

Pushes the current remote directory on a stack, in order to easily restore it later calling PopCurrentDirectory.
public PushCurrentDirectory ( ) : string
Результат string

PutFile() публичный Метод

Stores a remote file, returning a FtpStream to be used for writing the file contents. Call FtpStream.Close on the stream once done. See the PutFile(string, string) overload to easily transfer the contents of a local file.
public PutFile ( string remoteFileName ) : FtpStream
remoteFileName string
Результат FtpStream

PutFile() публичный Метод

PutFile overload to easily transfer a file from local to remote
public PutFile ( string localFileName, string remoteFileName ) : ulong
localFileName string
remoteFileName string
Результат ulong

PutFile() публичный Метод

PutFile overload to easily transfer a file from local to remote
public PutFile ( string localFileName, string remoteFileName, FileTransferCallback transferCallback ) : ulong
localFileName string
remoteFileName string
transferCallback FileTransferCallback
Результат ulong

PutFiles() публичный Метод

Transfers all files to the current remote directory without recursion
public PutFiles ( string localDirectoryName ) : void
localDirectoryName string
Результат void

PutFiles() публичный Метод

Transfers all files to the current remote directory. Optionally recursive
public PutFiles ( string localDirectoryName, bool recursive ) : void
localDirectoryName string
recursive bool
Результат void

PutFiles() публичный Метод

Transfers all files, matching the given pattern, to the current remote directory. Optionally recursive
public PutFiles ( string localDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive ) : void
localDirectoryName string
filePattern string
patternStyle EPatternStyle
recursive bool
Результат void

PutFiles() публичный Метод

public PutFiles ( string localDirectoryName, string remoteDirectoryName, string filePattern, EPatternStyle patternStyle, bool recursive, FileTransferCallback transferCallback ) : void
localDirectoryName string
remoteDirectoryName string
filePattern string
patternStyle EPatternStyle
recursive bool
transferCallback FileTransferCallback
Результат void

PutUniqueFile() публичный Метод

public PutUniqueFile ( string &remoteFileName ) : FtpStream
remoteFileName string
Результат FtpStream

PutUniqueFile() публичный Метод

PutUniqueFile overload to easily transfer a file from local to remote
public PutUniqueFile ( string localFileName, string &remoteFileName ) : ulong
localFileName string
remoteFileName string
Результат ulong

PutUniqueFile() публичный Метод

PutUniqueFile overload to easily transfer a file from local to remote.
public PutUniqueFile ( string localFileName, string &remoteFileName, FileTransferCallback transferCallback ) : ulong
localFileName string
remoteFileName string
transferCallback FileTransferCallback
Результат ulong

RemoveDir() публичный Метод

Removes the given remote directory.
public RemoveDir ( string remoteDirName ) : void
remoteDirName string
Результат void

RenameFile() публичный Метод

Renames the given remote file.
public RenameFile ( string remoteFileNameFrom, string remoteFileNameTo ) : void
remoteFileNameFrom string
remoteFileNameTo string
Результат void

SendCustomCommand() публичный Метод

Sends the given FTP command text to the server.
In case of return codes >= 400 an exception is thrown.
public SendCustomCommand ( string command ) : FtpReply
command string
Результат FtpReply

SetCurrentDirectory() публичный Метод

Changes the remote current directory.
public SetCurrentDirectory ( string remoteDirName ) : void
remoteDirName string
Результат void

SetLanguage() публичный Метод

Set the language used by the server during the current connection. Please check the features returned by GetFeatues for a list of available languages supported by the server.
public SetLanguage ( string ietfLanguageTag ) : void
ietfLanguageTag string RFC 1766 language tag.
Результат void

SetTextEncoding() публичный Метод

Set the given text encoding.
public SetTextEncoding ( ETextEncoding textEncoding ) : void
textEncoding ETextEncoding
Результат void

SetTransferMode() публичный Метод

Set the representation type according to the given parameter
public SetTransferMode ( ETransferMode transferMode ) : void
transferMode ETransferMode
Результат void

StartKeepAlive() публичный Метод

Issues NOOP commands periodically in a separated thread
public StartKeepAlive ( ) : void
Результат void

StopKeepAlive() публичный Метод

Stops the keep alive thread
public StopKeepAlive ( ) : void
Результат void