PSX_ACCESS
Check file accessibility
Description:
Provides a FORTRAN interface to the C
library function access() to determine the existence of a file for a specified type of access.
Invocation
CALL PSX_ACCESS( NAME, MODE, ACCESSIBLE, REASON, STATUS )
Arguments
NAME =
CHARACTER()
(Given)
The name of the file to test.
MODE =
CHARACTER()
(Given)
The access mode - either a ’’ (space) to merely check for file existence or one or more of the
letters R,W,X.
ACCESSIBLE = LOGICAL (Returned)
.TRUE. if the access mode is allowed. .FALSE.
otherwise.
REASON = INTEGER (Returned)
Error code (errno) describing the reason for failure.
Can be passed to EMS_SYSER for translation if required. Will be zero if ACCESSIBLE is true or if
status was set.
STATUS = INTEGER (Given & Returned)
Inherited status.
Notes:
Some
FORTRAN compilers have an ACCESS intrinsic, but not all. This PSX routine is provided for
portability.
References
Copyright
Copyright (C) 1995 Council for the Central
Laboratory of the Resarch Councils, Copyright (C) 2005 Particle Physics and Astronomy Research
Council
Copyright © 2000 Council for the Central Laboratory of the Research Councils, 2006 Particle Physics
and Astronomy Research Council