Xceed FTP Library Documentation
ListFolderContents method
XceedFtp control reference > Methods > ListFolderContents method

Description

Get a listing of a folder's contents via the ListingFolderItem event. The event is triggered once for each file, folder or link found in the folder being listed.

The sFolderMask parameter lets you specify a filtering mask using wildcards (such as "*.txt") in order to limit which items are listed. The same parameter also allows you to specify a path portion in order to list the contents of another folder. The path portion of the mask may be relative to the current folder, or absolute to the remote system. For example, if the FTP server's current working folder is "/cars", here's what various possibilities for the sFolderMask parameter will do:

This method can only be used when the CurrentState property's value is fcsConnected.

Parameters 

Parameter Description
sFolderMask  The mask or the path and mask for filtering listing. If this parameter is left empty, all items in the will be listed.

Remarks

The ListParsingFlags property determines if the XceedFtp control should parse the FTP server’s directory listing data or leave it up to your application to parse the data by handling the ParsingListLine event.

Declaration  
ListFolderContents( [in] BSTR sFolderMask )

Applicable properties

AccountName, ListParsingFlags, PassiveMode

Events triggered

ListingFolderItem, LoggingCommandLine, ProcessCompleted