Platform | x64, Win32 |
Purpose |
To obtain directory information. |
Syntax |
SUBROUTINE DIRENT@(PAT,
ATTRIBUTE, RESULT, RESULT_ATTRIBUTE, &
|
Description |
DIRENT@ returns directory information for files selected by PAT (e.g. A:\*.FOR). That is, each call of the routine searches for a single file in the directory and with the extension implied by PAT. The attribute of the first file returned is selected by setting ATTRIBUTE to one of the following values: |
|
0 |
Return a normal file |
|
2 |
Return a hidden file |
|
4 |
Return a system file |
|
6 |
Return a volume name |
|
16 |
Return a sub directory |
|
The name of the file that has been found is returned in RESULT. Other file
information is returned in RESULT_ATTRIBUTE, RESULT_DATE, RESULT_TIME and
FILE_SIZE. The file attributes are returned in DOS coded form using bits 0 to 5
of the result. The date and time are returned in DOS compressed format.
|
Notes |
A sequence of calls to DIRENT@ with a given PAT must not be interrupted by a
call to DIRENT@ with a different PAT.
|
Example |
PROGRAM DIRENT |