1DPNS_ACCESS(3)              DPNS Library Functions              DPNS_ACCESS(3)
2
3
4

NAME

6       dpns_access - check existence/accessibility of a file/directory
7

SYNOPSIS

9       Under Unix:
10       #include <sys/types.h>
11       #include <unistd.h>
12       #include "dpns_api.h"
13
14       Under Windows/NT:
15       #include <sys/types.h>
16       #define R_OK 4
17       #define W_OK 2
18       #define X_OK 1
19       #define F_OK 0
20       #include "dpns_api.h"
21
22       int dpns_access (const char *path, int amode);
23

DESCRIPTION

25       dpns_access  checks  in  the  name server database the existence or the
26       accessibility of the file/directory path according to the  bit  pattern
27       in amode using the real user ID.
28
29       path   specifies  the  logical  pathname  relative  to the current DPNS
30              directory or the full DPNS pathname.
31
32       amode  the bit pattern is built by an OR of the  constants  defined  in
33              <unistd.h>  under  Unix  or  to be explicitly defined under Win‐
34              dows/NT:
35
36              R_OK   test for read permission
37
38              W_OK   test for write permission
39
40              X_OK   test for search/execute permission
41
42              F_OK   test for existence of the directory/file.
43

RETURN VALUE

45       This routine returns 0 if the operation was successful  or  -1  if  the
46       operation failed. In the latter case, serrno is set appropriately.
47

ERRORS

49       ENOENT       The  named  file/directory does not exist or is a dangling
50                    symbolic link.
51
52       EACCES       Search permission is denied on a  component  of  the  path
53                    prefix or specified access to the file itself is denied.
54
55       EFAULT       path is a NULL pointer.
56
57       ENOTDIR      A component of path prefix is not a directory.
58
59       EINVAL       amode is invalid.
60
61       ENAMETOOLONG The  length of path exceeds CA_MAXPATHLEN or the length of
62                    a path component exceeds CA_MAXNAMELEN.
63
64       SENOSHOST    Host unknown.
65
66       SENOSSERV    Service unknown.
67
68       SECOMERR     Communication error.
69
70       ENSNACT      Name server is not running or is being shutdown.
71

SEE ALSO

73       Castor_limits(4),             dpns_chdir(3),             dpns_chmod(3),
74       dpns_stat(3), dpns_statg(3)
75

AUTHOR

77       LCG Grid Deployment Team
78
79
80
81DPNS         $Date: 2011-02-18 08:03:13 +0100 (Fri, 18 Feb 2011)D$PNS_ACCESS(3)
Impressum