rfio_access man page

RFIO_ACCESS(3) Rfio Library Functions RFIO_ACCESS(3)

rfio_access - check existence/accessibility of a file/directory

Under Unix:
[1m#include <sys/types.h>[0m
[1m#include <unistd.h>[0m
[1m#include "rfio_api.h"[0m

Under Windows/NT:
[1m#include <sys/types.h>[0m
[1m#define R_OK 4[0m
[1m#define W_OK 2[0m
[1m#define X_OK 1[0m
[1m#define F_OK 0[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_access (const char *[4m[22mpath[24m[1m, int [4m[22mamode[24m[1m);[0m

[1mrfio_access [22mchecks the existence or the accessibility of the
file/directory [4mpath[24m according to the bit pattern in [4mamode[24m using the
real user ID.

[4mpath[24m specifies the logical pathname relative to the current directory
or the full pathname.

[4mamode[24m the bit pattern is built by an OR of the constants defined in
<[1munistd.h[22m> under Unix or to be explicitly defined under Win-

[1mR_OK [22mtest for read permission

[1mW_OK [22mtest for write permission

[1mX_OK [22mtest for search/execute permission

[1mF_OK [22mtest for existence of the directory/file.

This routine returns 0 if the operation was successful or -1 if the
operation failed. In the latter case, [1mserrno [22mis set appropriately.

[1mENOENT [22mThe named file/directory does not exist.

[1mEACCES [22mSearch permission is denied on a component of the [4mpath[0m
prefix or specified access to the file itself is denied.

[1mEFAULT [4m[22mpath[24m is a NULL pointer.

[1mENOTDIR [22mA component of [4mpath[24m prefix is not a directory.

[1mEINVAL [4m[22mamode[24m is invalid.

[1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSECOMERR [22mCommunication error.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m, [1mrfio_chmod(3)[22m, [1mrfio_stat(3)[0m

[1mLCG Grid Deployment [22mTeam

LCG $Date: 2010-04-05 09:51:26 +0200 (Mon, 05 Apr 2010)R$FIO_ACCESS(3)