STAT(3F) — FORTRAN LIBRARY ROUTINES
NAME
stat, lstat, fstat − get file status
SYNOPSIS
integer function stat(name,statb)
character∗(∗) name
integer statb(13) integer function lstat(name,statb)
character∗(∗) name
integer statb(13) integer function fstat(lunit,statb)
integer statb(13)
DESCRIPTION
These routines return detailed information about a file.
The functions stat and lstat do the query by filename.
The function fstat does the query by FORTRAN logical unit lunit.
The value of each function is zero if successful, and an error code otherwise.
The variable statb receives the status structure for the file. Calling Sequences: stat :
integer stat, statb(13)
character name∗(∗)
ierr = stat ( name, statb ) fstat :
integer fstat, logunit, statb(13)
ierr = fstat ( logunit, statb ) lstat :
integer lstat, statb(13)
character name∗(∗)
ierr = lstat ( name, statb ) The meaning of the information returned in array statb is as described for the structure stat under stat(2).
Spare values are not included. 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
FILES
libF77.a
SEE ALSO
stat(2), access(3F), perror(3F), time(3F)
BUGS
Pathnames can be no longer than MAXPATHLEN as defined in <sys/param.h>.
Sun Release 4.1 — Last change: 12 June 1991