Internet Direct (Indy) Version 9.0.2 Beta
TIdFTP.List
Gets a list of files and directories on the FTP server.

procedure List(ADest: TStrings; const ASpecifier: string; const ADetails: boolean);
Parameters
ADest: TStrings
List for files and directories in the current directory.

const ASpecifier: string = ''
File mask for the listing. Default value is ''.

const ADetails: boolean = true
Include file details. Default value is True.

Description
List is a procedure used to request a list of files or directories in the current directory on the FTP server.

ADest is the TStringList used to store the information requested.

ASpecifier is a String that contains a mask indicating the files and/or directories to be included in the listing. ASpecifier can contain common wildcard characters like '*' and '?'. Some useful masks include:

ADetails is a Boolean that indicates if the list should contain details about the files and directories that match the mask in ASpecifier.

When ADetails is False, only the file or directory name is returned in the ADest string list using the FTP NLST command.

When ADetails is True, List can return FTP server-dependent details including the file size, date modified, and file permissions for the Owner, Group, and User using the FTP LIST command.

List will initialize and Clear the DirectoryListing property, and parse the return values in ADest into collection items in the DirectoryListing container. When ADest is empty, parsing of the formatted DirectoyListing is omitted.

List calls methods in DirectoryListing that detects common data formats returned by FTP servers. Applications can override the default detection and parsing behavior by assigning procedures to the OnCheckListFormat and OnParseCustomListFormat event handlers.