Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

FSTAT


Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also

The FSTAT function returns status information about a specified file unit.

Syntax

Result = FSTAT(Unit)

Return Value

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 contents of this structure are documented in The FSTAT Function.

Fields of the FSTAT Structure

The following descriptions are of fields in the structure returned by the FSTAT function. They are not keywords to FSTAT.

Arguments

Unit

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.

Keywords

None.

Examples

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.' 

Version History

Introduced: Original

See Also

ASSOCFILE_INFOFILE_TESTOPEN


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]