4D Internet Commands v16FTP_GetDirList |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Internet Commands v16
FTP_GetDirList
FTP_GetDirList
The FTP_GetDirList command will retrieve a list of the objects in a directory of the FTP session identified by ftp_ID. Information on the names, sizes, types, modification dates and, optionally, modification times of the directory items is returned in arrays. A connection to the FTP site must have already been opened via FTP_Login and still valid (FTP_VerifyID). The FTP_GetDirList command changes your current working directory (CWD) to the path given and returned to the directory parameter. ftp_ID is the long integer reference to the FTP session established with FTP_Login. directory is a text value in the format of a HostPath which references a FTP directory. A 4D variable or field must be passed to this parameter since the resulting "current directory" will be returned. Normally, the value returned to this parameter will be the same as the value passed to it. However, there may be cases (such as access restrictions) where the directory change was not successful. In this case, the directory parameter will hold the HostPath to the session's current directory. A null string passed in this parameter will return the current directory file list into the arrays and the current directory's HostPath into the directory parameter. names is a string or text array to hold the name of each object in the specified directory. sizes is a long integer array to hold the sizes of the objects in directory. kinds is an integer array to hold the type of each object in directory. The interpretation of this value is based on the following table:
Note: In the case of a symbolic link (kind=4), the FTP server returns a particular pathname (Alias name + symbol + pathname to the source file or folder). If you try to use this pathname to access source files or folders, an error will be returned. You MUST extract the pathname to the source file or folder from the string returned by FTP_GetDirList which starts just after the symbolic character. Otherwise, commands such as FTP_GetFileInfo will return the error –10085 since the file or folder will not be found. modDates is a 4D date array to hold the last modified date for each object in directory. Reminder: In 4D, longint arrays are used for handling time type data (each array item represents a number of seconds). Use the Time string command to convert these values into the HH:MM:SS format.
Siehe auch
|
EIGENSCHAFTEN
Produkt: 4D Internet Commands
GESCHICHTE
Geändert: 4D Internet Commands 2003 ARTIKELVERWENDUNG
4D Internet Commands ( 4D Internet Commands v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||