Compaq Fortran for Tru64 UNIX Alpha Systems V5.4

access (3f)


Syntax

  integer*4 access, ierrno
  external access
  character*len name, mode
  ierrno = access ( name, mode )

Description

  The access function checks the given file ( name ) for accessibility with
  respect to the caller according to mode. The mode can include one or more
  of the following (in any order and in any combination):

         r        Test for read permission
         w        Test for write permission
         x        Test for execute permission
         (blank)  Test for existence

Restrictions

  Pathnames cannot be longer than MAXPATHLEN (as defined in sys/param.h ).

Return Values

  If the specified access is successful, a zero is returned.  An error code
  is returned if either argument is illegal, or if the file cannot be
  accessed in all of the specified modes.

See Also

  perror(3f)