next up previous 216
Next: PSX_ASCTIME - Convert a time structure to a character string
Up: Routine Descriptions
Previous: Routine Descriptions


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



next up previous 216
Next: PSX_ASCTIME - Convert a time structure to a character string
Up: Routine Descriptions
Previous: Routine Descriptions

PSX POSIX interface routines
Starlink User Note 121
P M Allan
A J Chipperfield
8th November 2007
E-mail:starlink@jiscmail.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils, 2006 Particle Physics and Astronomy Research Council