FSTAT (The GNU Fortran Compiler)

### 8.123 `FSTAT` — Get file status ¶

Synopsis:

  `CALL FSTAT(UNIT, VALUES [, STATUS])`
  `STATUS = FSTAT(UNIT, VALUES)`

Description:

  `FSTAT` is identical to `STAT` — Get file status, except that information about an already opened file is obtained.

  The elements in `VALUES` are the same as described by `STAT` — Get file status.

  This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.

Class:

  Subroutine, function

Arguments:

  UNIT | An open I/O unit number of type `INTEGER`.
  VALUES | The type shall be `INTEGER, DIMENSION(13)` of either kind 4 or kind 8.
  STATUS | (Optional) status flag of type `INTEGER` of kind 2 or larger. Returns 0 on success and a system specific error code otherwise.

Example:

  See `STAT` — Get file status for an example.

Standard:

  GNU extension

See also:

  To stat a link:
  `LSTAT` — Get file status
  To stat a file:
  `STAT` — Get file status