1RFIO_ACCESS(3) Rfio Library Functions
2RFIO_ACCESS(3)
3
4
5
6[1mNAME[0m
7 rfio_access ‐ check existence/accessibility of a file/di‐
8rectory
9
10[1mSYNOPSIS[0m
11 Under Unix:
12 [1m#include <sys/types.h>[0m
13 [1m#include <unistd.h>[0m
14 [1m#include "rfio_api.h"[0m
15
16 Under Windows/NT:
17 [1m#include <sys/types.h>[0m
18 [1m#define R_OK 4[0m
19 [1m#define W_OK 2[0m
20 [1m#define X_OK 1[0m
21 [1m#define F_OK 0[0m
22 [1m#include "rfio_api.h"[0m
23
24 [1mint rfio_access (const char *[4m[22mpath[24m[1m, int
25[4m[22mamode[24m[1m);[0m
26
27[1mDESCRIPTION[0m
28 [1mrfio_access [22mchecks the existence or the
29accessibility of the
30 file/directory [4mpath[24m according to the bit pattern
31in [4mamode[24m using the
32 real user ID.
33
34 [4mpath[24m specifies the logical pathname relative to
35the current directory
36 or the full pathname.
37
38 [4mamode[24m the bit pattern is built by an OR of the
39constants defined in
40 <[1munistd.h[22m> under Unix or to be explicit‐
41ly defined under Win‐
42 dows/NT:
43
44 [1mR_OK [22mtest for read permission
45
46 [1mW_OK [22mtest for write permission
47
48 [1mX_OK [22mtest for search/execute permission
49
50 [1mF_OK [22mtest for existence of the directo‐
51ry/file.
52
53[1mRETURN VALUE[0m
54 This routine returns 0 if the operation was successful or
55‐1 if the
56 operation failed. In the latter case, [1mserrno [22mis set
57appropriately.
58
59[1mERRORS[0m
60 [1mENOENT [22mThe named file/directory does not ex‐
61ist.
62
63 [1mEACCES [22mSearch permission is denied on a
64component of the [4mpath[0m
65 prefix or specified access to the file itself
66is denied.
67
68 [1mEFAULT [4m[22mpath[24m is a NULL pointer.
69
70 [1mENOTDIR [22mA component of [4mpath[24m prefix is
71not a directory.
72
73 [1mEINVAL [4m[22mamode[24m is invalid.
74
75 [1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds
76[1mCA_MAXPATHLEN [22mor the length of
77 a [4mpath[24m component exceeds [1mCA_MAX‐
78NAMELEN[22m.
79
80 [1mSENOSHOST [22mHost unknown.
81
82 [1mSENOSSERV [22mService unknown.
83
84 [1mSECOMERR [22mCommunication error.
85
86[1mSEE ALSO[0m
87 [1mCastor_limits(4)[22m, [1mrfio_chmod(3)[22m, [1mr‐
88fio_stat(3)[0m
89
90[1mAUTHOR[0m
91 [1mLCG Grid Deployment [22mTeam
92
93
94
95LCG $Date$
96RFIO_ACCESS(3)
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132