|
Summary
Select short or long directory listing.
Description
The ListType property determines what type of directory listing will be generated. It can be set to either one of the following two values.
| Value |
Meaning |
| LIST_TYPE_SHORT |
File or directory name only. |
| LIST_TYPE_LONG |
File or directory name plus attributes. |
Directory listings are generated by setting the DirAction property to DIR_ACTION_LIST. Until all files in the current remote working directory have been listed (or until the DirAction property is set
to DIR_ACTION_ABORT), OnList events are generated for each file or directory in the remote directory. OnList events generated for a short listing will only include the name of a subdirectory or of a
file, but long listing lines may include any number of additional pieces of information. Most servers report the size of a file, the time and date of the last modification and the file attributes in
a long listing.
The Wildcards property can be used to restrict the directory listing to only those files and directories which match a given wildcard.
The format of long directory listing entries varies from one FTP server to another. Fields, such as name, size, date and time, may be displayed differently and may not be in the same order. It is up
to the application to interpret the incoming lines. In most cases, the directory entry lines can simply be displayed to the user without any further processing.
The ShortList and LongList methods can also be used to set the type of listing. Please check the reference pages of these methods for more detailed information on their usage.
Example
FTPClient.ListType = LIST_TYPE_SHORT FTPClient.DirAction = DIR_ACTION_LIST
Note
If you are writing a new application it is recommended to use the corresponding methods for these actions instead. These are the ShortList and LongList methods.
|