'Declaration Public Overloads Shared Sub Receive( _ ByVal hostname As String, _ ByVal port As Integer, _ ByVal username As String, _ ByVal password As String, _ ByVal authenticationMethod As AuthenticationMethod, _ ByVal verificationFlags As VerificationFlags, _ ByVal clientCertificate As Certificate, _ ByVal dataChannelProtection As DataChannelProtection, _ ByVal implicitAuthentication As Boolean, _ ByVal localDestinationFolder As String, _ ByVal replaceExistingFiles As Boolean, _ ByVal recursive As Boolean, _ ByVal preservePaths As Boolean, _ ByVal synchronizingObject As ISynchronizeInvoke, _ ByVal certificateReceivedCallback As QuickFtp.CertificateReceivedCallback, _ ByVal certificateRequiredCallback As QuickFtp.CertificateRequiredCallback, _ ByVal byteProgressionCallback As QuickFtp.ByteProgressionCallback, _ ByVal itemProgressionCallback As QuickFtp.ItemProgressionCallback, _ ByVal userParams As Object, _ ByVal ParamArray filesToReceive() As String _ )
'Usage Dim hostname As String Dim port As Integer Dim username As String Dim password As String Dim authenticationMethod As AuthenticationMethod Dim verificationFlags As VerificationFlags Dim clientCertificate As Certificate Dim dataChannelProtection As DataChannelProtection Dim implicitAuthentication As Boolean Dim localDestinationFolder As String Dim replaceExistingFiles As Boolean Dim recursive As Boolean Dim preservePaths As Boolean Dim synchronizingObject As ISynchronizeInvoke Dim certificateReceivedCallback As QuickFtp.CertificateReceivedCallback Dim certificateRequiredCallback As QuickFtp.CertificateRequiredCallback Dim byteProgressionCallback As QuickFtp.ByteProgressionCallback Dim itemProgressionCallback As QuickFtp.ItemProgressionCallback Dim userParams As Object Dim filesToReceive() As String QuickFtp.Receive(hostname, port, username, password, authenticationMethod, verificationFlags, clientCertificate, dataChannelProtection, implicitAuthentication, localDestinationFolder, replaceExistingFiles, recursive, preservePaths, synchronizingObject, certificateReceivedCallback, certificateRequiredCallback, byteProgressionCallback, itemProgressionCallback, userParams, filesToReceive)
public static void Receive( string hostname, int port, string username, string password, AuthenticationMethod authenticationMethod, VerificationFlags verificationFlags, Certificate clientCertificate, DataChannelProtection dataChannelProtection, bool implicitAuthentication, string localDestinationFolder, bool replaceExistingFiles, bool recursive, bool preservePaths, ISynchronizeInvoke synchronizingObject, QuickFtp.CertificateReceivedCallback certificateReceivedCallback, QuickFtp.CertificateRequiredCallback certificateRequiredCallback, QuickFtp.ByteProgressionCallback byteProgressionCallback, QuickFtp.ItemProgressionCallback itemProgressionCallback, object userParams, params string[] filesToReceive )
Parameters
- hostname
- The hostname of the FTP server to connect to. An IP address can also be used.
- port
- The port of the FTP server to which to connect to. If 0 is passed, 990 is used if implicitAuthentication is true; otherwise, 21 is used.
- username
- The username used to connect to the FTP server.
- password
- The password used to connect to the FTP server.
- authenticationMethod
- The authentication method to use when connecting to the FTP server.
- verificationFlags
- The verification flags used to verify the FTP server's certificate.
- clientCertificate
- The certificate used when connecting to the FTP server. Can be null.
- dataChannelProtection
- The DataChannelProtection used during the communication. Ignored if implicitAuthentication is true.
- implicitAuthentication
- If true, the SSL handshake occurs at the very beginning of the connection; otherwise, the AUTH command is sent after the Welcome message to initiate the SSL handshake.
- localDestinationFolder
- The local destination folder into which the files will be placed.
- replaceExistingFiles
- true if existing items in the destination should be replaced; false otherwise.
- recursive
- Boolean value indicating if files contained within sub-folders should be gotten from the ftp host.
- preservePaths
- Boolean value indicating if the directory structure should be preserved in the destination folder.
- synchronizingObject
- The object used to automatically redirect events on the main UI thread; null if not required.
- certificateReceivedCallback
- Delegate for CertificateReceived notification.
- certificateRequiredCallback
- Delegate for CertificateRequired notification.
- byteProgressionCallback
- Delegate for ByteProgression notification.
- itemProgressionCallback
- Delegate for ItemProgression notification.
- userParams
- Opaque data that will be passed back to the event handler when an event is raised.
- filesToReceive
- A list of strings representing the files to be gotten. File paths may not start with a \ or a /. If a path represents a folder, it must end with a / or a \.