Compaq Fortran for Tru64 UNIX Alpha Systems V5.4

stat, lstat, fstat (3f)


Syntax

  integer*4 stat, ierrno, statb(12)
  character*len name
  external stat
  ierrno = stat ( name, statb )

  integer*4 lstat, ierrno, statb(12)
  character*len name
  external lstat
  ierrno = lstat ( name, statb )

  integer*4 fstat, ierrno, lunit, statb(12)
  external fstat
  ierrno = fstat ( lunit, statb )

Description

  These routines return detailed information about a file.  The stat function
  returns information about the specified file name.

  The lstat function is like stat except when a named file is a symbolic
  link.  In this case, lstat returns information about the link; stat returns
  information about the file that is referenced by the link.

  The fstat function returns information about the file associated with
  logical unit lunit.

  The order and meaning of the information returned in array statb is as
  described for the structure stat in stat(2).  The spare values are not
  included.

Restrictions

  Pathnames cannot be longer than MAXPATHLEN (as defined in sys/param.h ).

Return Values

  If the stat function is successful, a zero is returned; otherwise, an error
  code is returned.

See Also

  stat(2), access(3f), perror(3f), time(3f)