stat

stat(3f)                                                              stat(3f)



Name
       stat, lstat, fstat - returns file status

Syntax
       integer stat, err, statb(13)
       character*len name
       external stat
       err = stat ( name, statb )

       integer lstat, err, statb(13)
       character*len name
       external lstat
       err = lstat ( name, statb )

       integer fstat, err, lunit, statb(13)
       external fstat
       err = 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 meaning of the information returned in array statb is as described
       for the structure stat in stat(2).  The order is shown below:

            statb(1)   device inode resides on
            statb(2)   this inode's number
            statb(3)   protection
            statb(4)   number of hard links to the file
            statb(5)   user-id of owner
            statb(6)   group-id of owner
            statb(7)   the device type, for inode that is device
            statb(8)   total size of file
            statb(9)   file last access time
            statb(10)  file last modify time
            statb(11)  file last status change time
            statb(12)  optimal blocksize for file system i/o ops
            statb(13)  actual number of blocks allocated

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.

Files
       libU77.a

See Also
       stat(2), access(3f), time(3f)

Bugs
       The values returned in statb(12) and statb(13) are incorrect on
       machines running IRIX.




                                                                      stat(3f)