pxfaccess(3F)

PXFACCESS - Checks the accessibility of a named file

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.

NAME
     PXFACCESS - Checks the accessibility of a named file

SYNOPSIS
     CHARACTER*n path
     INTEGER ilen, iamode, ierror
     CALL PXFACCESS(path, ilen, iamode, 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 PXFACCESS subroutine uses the access(2) system call to check the
     accessibility of a named file.

     The value of iamode indicates specific file permissions.  These file
     permissions are checked against the current file permissions specified
     for the file in path.  If the iamode permissions are allowed for the
     file in path, PXFACCESS returns a zero in ierror.  Otherwise, it
     returns a nonzero value.

     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 valid arguments for this subroutine:

     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 access().

     iamode    An input integer variable containing the integer value of
               the symbolic constant for one or more of the following
               permissions:  R_OK, W_OK, X_OK, or F_OK.  An integer value
               for each of these symbolic constants is retrieved through
               the use of PXFCONST or IPXFCONST.  The integer values may be
               combined through the use of a bitwise inclusive OR function.

     ierror    An output integer variable that contain zero if the
               requested access is permitted or nonzero if the requested
               access is not permitted.

     In addition to the errors returned by the access(2) system call,
     PXFACCESS may return the following errors:

     EINVAL    If ilen is less than 0 or ilen is greater than LEN(path)

     ENOMEM    If PXFACCESS is unable to obtain memory to copy path.

NOTES
     The PXF_DEFINITIONS module can be used by Fortran 90 users to enable
     caller-callee interface checking.

EXAMPLES
          program test
          character*(12) path
          integer ilen, iamod, ierr
          path = 'testfile'
          iamod = 0
          ilen = 0
          ierr = 0
          call pxfconst('R_OK',iamod,ierr)
          if (ierr.ne.0) then
              print *,'FAIL: error from pxfconst R_OK = ',ierr
          else
              print *,'PASS: No error from pxfconst R_OK = '
          endif
          ierr = 0
          call pxfaccess(path,ilen,iamod,ierr)
          if (ierr.ne.0) then
              print *,'FAIL: error from pxfaccess = ',ierr
          else
              print *,'PASS: No error from pxfaccess = '
          endif
          end

SEE ALSO
     access(2)