Discuss this help topic in SecureBlackbox Forum
Lists the remote directory contents.
Declaration
Parameters
- Path - path to the directory to read.
- Listing - the list will be filled by instances of the TElFTPFileInfo class, which represent the entries in the remote directory.
- Mask - specifies the mask (wildcards) to select the names. Only the file and directory names that match the mask will be returned.
Note, that FTP(S) doesn't support name masks, so, regardless of the mask, the whole directory will be read and scanned for matches.
- CaseSensitive - specifies whether the mask is case-sensitive.
- IncludeFiles - specifies whether filenames and symbolic links should be returned.
- IncludeDirectories - specifies whether directory names should be returned.
- Recursive - set this parameter to True to perform a recursive search, i.e., including subdirectories.
Description
Use this method to list remote directory contents.
This is a high-level method which choses the best listing command (MLSD is used, when available), changes working directory if needed (current directory is restored after the listing is obtained) and performs filtration of results.
The method fills an array specified by Listing parameter with a list of
TElFTPFileInfo objects.
ListDirectory should be called once per enumeration: it returns the complete directory contents.
Files are chosen by mask which can be a simple mask, set of masks or regular expression (read more
about masks).
[Pascal]
Note, TElFTPFileInfo objects returned by this function are not destroyed by TElSimpleFTPSClient and thus *must* be freed by user application.
Discuss this help topic in SecureBlackbox Forum