Share via


FtpClientConnection.GetListing(String[], String[]) Method

Definition

Lists the names of directories and files in the specified folder or directory from the FTP server.

public:
 void GetListing([Runtime::InteropServices::Out] cli::array <System::String ^> ^ % folderNames, [Runtime::InteropServices::Out] cli::array <System::String ^> ^ % fileNames);
public void GetListing (out string[] folderNames, out string[] fileNames);
member this.GetListing : String[] * String[] -> unit
Public Sub GetListing (ByRef folderNames As String(), ByRef fileNames As String())

Parameters

folderNames
String[]

An array containing the folders in the current folder.

fileNames
String[]

An array containing the files in the current folder.

Examples

The following code example shows how to use the GetListing method.

//Get all folders and files of the directory   
string[] folderNames;  
string[] fileNames;  
ftpClientConnection.GetListing(out folders, out files);   
'Get all folders and files of the directory   
Dim folderNames() As String  
Dim fileNames() As String  
ftpClientConnection.GetListing(folders, files)  

Remarks

Both folderNames and fileNames parameters are out parameters.

Applies to