Function Directory() Foundation
Fills an array with information about the files in a specified path.
Directory( [<cDirectory>], [<cAttribute>] ) --> aDirectory
Attribute | Meaning | |
---|---|---|
D | Directory | directories are also listed |
H | Hidden | hidden files are also listed |
S | System | system files are also listed |
V | Volume | retrieves name of the disk volume and ignores files |
The return value of Directory() 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_DATE *) | compatibility constant | |
F_WRITE_TIME | time of last update | C |
F_TIME *) | compatibility constant | |
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.
The environment function Directory() provides file information about all or a specific type of files in the specified path. Operations can be performed on the selected files using the array returned by Directory(). It should be noted that file names in the HPFS and NTFS file systems have a maximum length of 255 characters and can be mixed case. In the FAT file system, file names have a maximum of 12 characters and are always upper cased.
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.