Xceed .NET Libraries Documentation
GetFtpContents(String,Int32,String,String,AuthenticationMethod,VerificationFlags,Certificate,DataChannelProtection,Boolean,ProxyClient,Int32,Boolean,RepresentationType,TextWriter,String,Boolean,ISynchronizeInvoke,CertificateReceivedCallback,CertificateRequiredCallback,TransferMode,String[]) Method


Xceed.Ftp Assembly > Xceed.Ftp Namespace > QuickFtp Class > GetFtpContents Method : GetFtpContents(String,Int32,String,String,AuthenticationMethod,VerificationFlags,Certificate,DataChannelProtection,Boolean,ProxyClient,Int32,Boolean,RepresentationType,TextWriter,String,Boolean,ISynchronizeInvoke,CertificateReceivedCallback,CertificateRequiredCallback,TransferMode,String[]) Method
The hostname of the FTP server to connect to. An IP address can also be used.
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.
The username used to connect to the FTP server.
The password used to connect to the FTP server.
The authentication method to use when connecting to the FTP server. Not applicable to the Compact Framework version.
The verification flags used to verify the FTP server's certificate. Not applicable to the Compact Framework version.
The certificate used when connecting to the FTP server. Can be null. Not applicable to the Compact Framework version.
The DataChannelProtection used during the communication. Ignored if implicitAuthentication is true. Not applicable to the Compact Framework version.
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. Not applicable to the Compact Framework version.
The active proxy client for connecting to the FTP server.
period of time, in seconds, after which an FTP operation should timeout.
Boolean value indicating whether the data connection should be established by the FTP server rather than by the client-side.
The default value indicating how the data is transferred to and from the FTP server.
The System.IO.TextWriter which will trace the communications between the client-side and the FTP server.
The path to the remote folder to list. i.e.: \ftproot\test
Boolean value indicating if files contained within sub-folders should be got from the ftp host
Boolean value indicating if files contained within sub-folders should be got from the ftp host
Delegate for CertificateReceived notification. Not applicable to the Compact Framework version.
Delegate for CertificateRequired notification. Not applicable to the Compact Framework version.

The transfer mode used to send data to and from an FTP server.

The filters to apply for the GetFtpContents.
Gets a listing of the provided remote folder, specifying a port, a username/password, an authentication method, whether authentication is implicit, verification flags, a certificate, data channel protection, a proxy, a time-out, default representation type, whether files are listed recursively and/or passively, a trace writer, the transfer mode, a synchronizing object, delegates for notifications, and filters.
Syntax
'Declaration
 
Public Overloads Shared Function GetFtpContents( _
   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 proxy As ProxyClient, _
   ByVal timeout As Integer, _
   ByVal passiveTransfer As Boolean, _
   ByVal defaultRepresentationType As RepresentationType, _
   ByVal traceWriter As TextWriter, _
   ByVal remoteFolderToList As String, _
   ByVal recursive As Boolean, _
   ByVal synchronizingObject As ISynchronizeInvoke, _
   ByVal certificateReceivedCallback As QuickFtp.CertificateReceivedCallback, _
   ByVal certificateRequiredCallback As QuickFtp.CertificateRequiredCallback, _
   ByVal transferMode As TransferMode, _
   ByVal ParamArray filters() As String _
) As QuickFtpItem()
'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 proxy As ProxyClient
Dim timeout As Integer
Dim passiveTransfer As Boolean
Dim defaultRepresentationType As RepresentationType
Dim traceWriter As TextWriter
Dim remoteFolderToList As String
Dim recursive As Boolean
Dim synchronizingObject As ISynchronizeInvoke
Dim certificateReceivedCallback As QuickFtp.CertificateReceivedCallback
Dim certificateRequiredCallback As QuickFtp.CertificateRequiredCallback
Dim transferMode As TransferMode
Dim filters() As String
Dim value() As QuickFtpItem
 
value = QuickFtp.GetFtpContents(hostname, port, username, password, authenticationMethod, verificationFlags, clientCertificate, dataChannelProtection, implicitAuthentication, proxy, timeout, passiveTransfer, defaultRepresentationType, traceWriter, remoteFolderToList, recursive, synchronizingObject, certificateReceivedCallback, certificateRequiredCallback, transferMode, filters)

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. Not applicable to the Compact Framework version.
verificationFlags
The verification flags used to verify the FTP server's certificate. Not applicable to the Compact Framework version.
clientCertificate
The certificate used when connecting to the FTP server. Can be null. Not applicable to the Compact Framework version.
dataChannelProtection
The DataChannelProtection used during the communication. Ignored if implicitAuthentication is true. Not applicable to the Compact Framework version.
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. Not applicable to the Compact Framework version.
proxy
The active proxy client for connecting to the FTP server.
timeout
period of time, in seconds, after which an FTP operation should timeout.
passiveTransfer
Boolean value indicating whether the data connection should be established by the FTP server rather than by the client-side.
defaultRepresentationType
The default value indicating how the data is transferred to and from the FTP server.
traceWriter
The System.IO.TextWriter which will trace the communications between the client-side and the FTP server.
remoteFolderToList
The path to the remote folder to list. i.e.: \ftproot\test
recursive
Boolean value indicating if files contained within sub-folders should be got from the ftp host
synchronizingObject
Boolean value indicating if files contained within sub-folders should be got from the ftp host
certificateReceivedCallback
Delegate for CertificateReceived notification. Not applicable to the Compact Framework version.
certificateRequiredCallback
Delegate for CertificateRequired notification. Not applicable to the Compact Framework version.
transferMode

The transfer mode used to send data to and from an FTP server.

filters
The filters to apply for the GetFtpContents.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

QuickFtp Class
QuickFtp Members
Overload List