Retrieves a list of files and directories on the FTP server.
procedure List; overload;
List is an overloaded procedure used to request a list of files or directories in the current directory on the FTP server.
Unlike overloadeed variants of the List method, no file specifier is used and file details are always returned. List calls the overloaded List method using an Unassigned (Nil) value for the storage of the textual responses that make up the directory listing.
If CanUseMLS contains True, the ExtListDir is called to capture and store the results of the FTP MLSD command in the ADest parameter variable instead of the LIST or NLST commands. No additional processing is performed in the List method under this circumstance, and the method is exited.
Prior to executing the LIST command, the TransferType for the control channel is set to ftASCII. While this is not a requirement of the FTP protocol, it is a common practice in most FTP clients. The previous value of the TransferType property is restored before exiting from the List method.
Textual responses to the FTP command are captured and stored in the ListResult property. The value of the UsedMLS property is set to False to indicate that the MLST parser should not be used on textual values in the ListResult property.
List will clear any existing entries found in the DirectoryListing property, and free the collection used for the structured directory listing. The collection is recreated and values in the ListResult are parsed into collection items on the initial read access to the DirectoryListing property.
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved. Website http://www.indyproject.org. Post feedback to the Indy Documentation newsgroup. |