pxfstat(3F)
PXFSTAT - Retrieves the file status
Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.
NAME PXFSTAT - Retrieves the file status SYNOPSIS INTEGER jstat, ilen, ierror CALL PXFSTAT(path, ilen, jstat, ierror) STANDARDS IEEE standard interface for FORTRAN 77 DESCRIPTION This routine is in libfortran.so which is linked by default when compiling programs with the MIPSpro 7 Fortran 90 compiler or when compiling programs with the -craylibs option to the MIPSpro F77 compiler. The PXFSTAT routine uses the stat system call to get the file status. All arguments must be of default kind unless documented otherwise. On IRIX systems, the default kind is KIND=4. The following is a list of arguments for this routine: path An input character variable or array element containing the name of a file. ilen An input integer variable containing the length of path in characters. If ilen is zero, all trailing blanks are removed before calling stat(). jstat An input integer variable or array element containing a handle for a stat structure. This handle should have been created by a call to the PXFSTRUCTCREATE(3F) routine. ierror An output integer variable that contains the status: Zero PXFSTAT returned the status information. Nonzero PXFSTAT was unable to return the status. In addition to errors returned by the stat(2) system call, the following errors may occur: EINVAL If ilen < 0 or ilen > LEN(path). ENOMEM If PXFSTAT is unable to obtain memory to copy path. The stat structure contains the following components: * st_mode: File mode. * st_ino: File serial number. * st_dev: ID of device containing the file. * st_nlink: Number of links. * st_uid: User id of the owner of the file. * st_gid: Group id of the owner of the file. * st_size: File size in bytes for regular files. Unspecified for other files. * st_atime: Last time that data within the file was accessed. * st_mtime: Last time that data in the file was modified. * st_ctime: Last time that file status was changed. NOTES The PXF_DEFINITIONS module can be used by Fortran 90 users to enable caller-callee interface checking. EXAMPLES program test character*10 path integer ilen, jstat, ierr,imode, istino path = 'stt.f' call pxfstructcreate('stat',jstat,ierr) print *,'structcreate error = ',ierr ilen=0 call pxfstat(path, ilen, jstat, ierr) if (ierr.ne.0) then print *,'FAIL: error from pxfstat = ',ierr else print *,'PASS: No error from pxfstat = ' endif call pxfintget(jstat,'st_ino',istino,ierr) call pxfintget(jstat,'mode',imode,ierr) print *,'st_ino = ',istino print *,'mode = ',imode call pxfstructfree(stat,ierr) end