Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Methods > ExtListDir Method
TIdFTP.ExtListDir Method

Implements support for the MLSD directory listing format.

procedure ExtListDir(
    const ADest: TIdStrings = nil; 
    const ADirectory: string = ''
Storage for the textual results in the FTP response.
Directory name for the standardized kisting format. 

ExtListDir is a procedure used to implement the FTP MLSD extension command for servers supporting the capability. The MLST and MLSD commands provide a defined format for directories and files apprearing on the remote file system. 

The MLSD command, supported in ExtListDir, accepts an optional directory name or relative path in Adirectory for the directory listing. If am empty string is passed in ADirectory, the current directory is used for the directory listing operation. 

MLSD returns a a listing with the contents of the named directory using the control channel for the FTP client. MLSD includes information about files and directories found in the named or implied directory. MLSD does not include any title, header, or summary lines, or any other formatting, and conforms to the facts indicated in the Capabilities for the FTP server. 

ADest is used to capture and store the textual results returned in the response for the MLSD command in the ListResult property. In addition, ExtListDir frees any existing entries and the container represented by the DirectoryListing property. Values in ListResult will be parsed into item entries on the initial access to the DirectoryListing property. TIdFTP uses the TIdFTPLPMList list parser to access the facts included in the ListResults property. 

ExtListDir sets the value in UsedMLS to True to indicate the method used to capture the textual results in ListResults. 

ExtListDir is used in the implementation of the List method when CanUseMLS contains the value True. 

Use ExtListItem to get a directory listing for a single file or directory entry using the FTP MLST command.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.