1LFC_ACCESS(3)                     LFC      Library      Functions
2LFC_ACCESS(3)
3
4
5
6[1mNAME[0m
7       lfc_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 "lfc_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 "lfc_api.h"[0m
23
24       [1mint  lfc_access  (const  char  *[4m[22mpath[24m[1m, int
25[4m[22mamode[24m[1m);[0m
26
27[1mDESCRIPTION[0m
28       [1mlfc_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 LFC
36              directory or the full LFC 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,              [1mlfc_chdir(3)[22m,
92[1mlfc_chmod(3)[22m, [1mlfc_statg(3)[0m
93
94[1mAUTHOR[0m
95       [1mLCG Grid Deployment [22mTeam
96
97
98
99LFC                                                        $Date$
100LFC_ACCESS(3)
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
Impressum