The FSTAT function returns status information about a specified file unit.
Result = FSTAT(Unit)
The FSTAT function returns a structure expression of type FSTAT (or FSTAT64 in the case of files that are longer than 2^31-1 bytes in length) containing status information about a specified file unit.
The following descriptions are of fields in the structure returned by the FSTAT function. They are not keywords to FSTAT.
The file unit about which information is required. This parameter can be an integer or an associated variable, in which case information about the variable’s associated file is returned.
None.
If file unit number 1 is open, the FSTAT information on that unit can be seen by entering:
PRINT, FSTAT(1)
Specific information can be obtained by referring to single fields within the structure returned by FSTAT. The following code prints the name and length of the file open on unit 1:
; Put FSTAT information in variable A:
A = FSTAT(1)
; Print the name and size fields:
PRINT, 'File: ', A.NAME, ' is ', A.SIZE, ' bytes long.'
Original |
Introduced |
ASSOC , FILE_INFO , FILE_TEST , OPENR/OPENU/OPENW ,General File Access