1DPNS_ACCESS(3) DPNS Library Functions
2DPNS_ACCESS(3)
3
4
5
6[1mNAME[0m
7 dpns_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 "dpns_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 "dpns_api.h"[0m
23
24 [1mint dpns_access (const char *[4m[22mpath[24m[1m, int
25[4m[22mamode[24m[1m);[0m
26
27[1mDESCRIPTION[0m
28 [1mdpns_access [22mchecks in the name server database
29the existence or the
30 accessibility of the file/directory [4mpath[24m according
31to the bit pattern
32 in [4mamode[24m using the real user ID.
33
34 [4mpath[24m specifies the logical pathname relative
35to the current DPNS
36 directory or the full DPNS 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
61exist or is a dangling
62 symbolic link.
63
64 [1mEACCES [22mSearch permission is denied on a com‐
65ponent of the [4mpath[0m
66 prefix or specified access to the file itself
67is denied.
68
69 [1mEFAULT [4m[22mpath[24m is a NULL pointer.
70
71 [1mENOTDIR [22mA component of [4mpath[24m prefix is
72not a directory.
73
74 [1mEINVAL [4m[22mamode[24m is invalid.
75
76 [1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds
77[1mCA_MAXPATHLEN [22mor the length of
78 a [4mpath[24m component exceeds [1mCA_MAX‐
79NAMELEN[22m.
80
81 [1mSENOSHOST [22mHost unknown.
82
83 [1mSENOSSERV [22mService unknown.
84
85 [1mSECOMERR [22mCommunication error.
86
87 [1mENSNACT [22mName server is not running or is being
88shutdown.
89
90[1mSEE ALSO[0m
91 [1mCastor_limits(4)[22m, [1mdpns_chdir(3)[22m,
92[1mdpns_chmod(3)[22m,
93 [1mdpns_stat(3), dpns_statg(3)[0m
94
95[1mAUTHOR[0m
96 [1mLCG Grid Deployment [22mTeam
97
98
99
100DPNS $Date$
101DPNS_ACCESS(3)
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