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
파일 보기 프로젝트 열기: jcaillon/3P 1 사용 예제들

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