pxfutime(3F)

PXFUTIME - Sets access and modification times of a file

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

NAME
     PXFUTIME - Sets access and modification times of a file

SYNOPSIS
     CHARACTER*n path
     INTEGER ilen, jutimbuf, ierror
     CALL PXFUTIME(path, ilen, jutimbuf, 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 routine PXFUTIME provides the functionality of the utime(2) system
     call.

     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 routine:

     path        An input character variable or array element containing
                 the name of the file.

     ilen        An input integer variable containing the length of path in
                 characters.  If ilen is zero, all trailing blanks are
                 removed before calling utime.

     jutimbuf    An input integer variable.  It is a handle for a structure
                 of type utimbuf.  The handle must be created by a call to
                 the PXFSTRUCTCREATE(3F) routine prior to the call to
                 PXFUTIME.  The names of the components of the utimbuf
                 structure are actime and modtime.  These components can be
                 accessed through the PXFINTSET subroutine.  The
                 functionality obtained in utime by passing a NULL can be
                 obtained in PXFUTIME by passing a handle argument with a
                 value of zero.

     ierror      An output integer variable that contains zero if the call
                 to utime was successful or nonzero if the call to utime
                 was not completed.

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

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

     ENOMEM       If PXFUTIME 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 filea, fileb
                integer ilenfila, ilenfilb, jutimbuf, ierr

          ! create file
                open(file='existfile', unit=9, status='NEW')
                write(9,*) 'HI', 1.2, 11, 'GOODBYE'
                endfile 9
                close 9

                filea = 'existfile'
                ilenfila = 0
                ilenfilb = 0

          ! Set file access and modification time to current time
                call pxfutime(filea,ilenfila,0,ierr)
                if (ierr.ne.0) then
                   print *,'FAIL: pxfutime'
                   print *,'nonzero status on existing file = ',ierr
                else
                   print *,'PASS: pxfutime'
                   print *,'zero status on existing file'
                endif

                end