1RFIO_ACCESS(3)              Rfio Library Functions              RFIO_ACCESS(3)
2
3
4

NAME

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

SYNOPSIS

9       Under Unix:
10       #include <sys/types.h>
11       #include <unistd.h>
12       #include "rfio_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 "rfio_api.h"
21
22       int rfio_access (const char *path, int amode);
23

DESCRIPTION

25       rfio_access   checks   the   existence  or  the  accessibility  of  the
26       file/directory path according to the bit pattern  in  amode  using  the
27       real user ID.
28
29       path   specifies the logical pathname relative to the current directory
30              or the full 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.
50
51       EACCES       Search  permission  is  denied  on a component of the path
52                    prefix or specified access to the file itself is denied.
53
54       EFAULT       path is a NULL pointer.
55
56       ENOTDIR      A component of path prefix is not a directory.
57
58       EINVAL       amode is invalid.
59
60       ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length  of
61                    a path component exceeds CA_MAXNAMELEN.
62
63       SENOSHOST    Host unknown.
64
65       SENOSSERV    Service unknown.
66
67       SECOMERR     Communication error.
68

SEE ALSO

70       Castor_limits(4), rfio_chmod(3), rfio_stat(3)
71

AUTHOR

73       LCG Grid Deployment Team
74
75
76
77LCG          $Date: 2010-04-05 09:51:26 +0200 (Mon, 05 Apr 2010)R$FIO_ACCESS(3)
Impressum