Method FTPClient():directory() Professional
Fills an array with information about the files in a specified path.
:directory( [<cDirectory>], [<cAttribute>] ) --> aDirectory
Attribute | Meaning | Description |
---|---|---|
D | Directory | directories are also listed |
H | Hidden | hidden files are also listed |
S | System | system files are also listed |
The return value of the :directory() method is a two dimensional array containing information about one of the files specified by <cDirectory> in each subarray. The array columns can be identified using symbolic constants defined in the Header file "Directry.ch". The contents of each array column are given in the following table:
Constant | Contents | data type |
---|---|---|
F_NAME | file name | C |
F_SIZE | size of the file | N |
F_WRITE_DATE | date of last update | D |
F_WRITE_TIME | time of last update | C |
F_ATTR | file attribute | C |
F_EA_SIZE | size of the extended file attributes | N |
F_CREATION_DATE | date of creation | D |
F_CREATION_TIME | time of creation | C |
F_ACCESS_DATE | date of last opening | D |
F_ACCESS_TIME | time of last opening | C |
When <cDirectory> contains an invalid path or file specification, or no matching files are found, an empty array ({}) is returned. If information on a file cannot be provided by the remote filesystem, the corresponding array element is empty.
The method :directory() provides file information about all or a specific type of files in the specified path on the FTP server.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.