Xbasic
INET::FTPListDirectory Method
Syntax
.ListDirectory as L (BYREF Listing as C, TargetPath as C [, GetDetails as L = .f.])
Arguments
- ListingCharacter
The contents of the listing returned by the server.
- TargetPathCharacter
The target path to retrieve a directory listing for.
- GetDetailsLogical
Default = .f.. Determines whether a simple list is returned or a more detailed listing of the contents is returned.
Returns
- resultLogical
Returns .t. if the operation succeed. Otherwise, returns .f.. If an error occurred, the INET::FTP CallResult property will contain more information.
Description
Retrieves a directory of files within a folder on the server.
Example
dim ftp as INET::FTP ftp.UserName = "Fred" ftp.Password = "Secret" ftp.EnableSSL = .t. ftp.Host = "ftp.myserver.com" ftp.UsePassive = .t. dim Listing as C if ftp.ListDirectory(Listing, "/downloads", .f.) <> .t. ' error msg = ftp.callResult.error ... end if