dpns_access man page

DPNS_ACCESS(3)              DPNS Library Functions              DPNS_ACCESS(3)

      dpns_access - check existence/accessibility of a file/directory

      Under Unix:
      [1m#include <sys/types.h>[0m
      [1m#include <unistd.h>[0m
      [1m#include "dpns_api.h"[0m

      Under Windows/NT:
      [1m#include <sys/types.h>[0m
      [1m#define R_OK 4[0m
      [1m#define W_OK 2[0m
      [1m#define X_OK 1[0m
      [1m#define F_OK 0[0m
      [1m#include "dpns_api.h"[0m

      [1mint dpns_access (const char *[4m[22mpath[24m[1m, int [4m[22mamode[24m[1m);[0m

      [1mdpns_access  [22mchecks  in  the  name server database the existence or the
      accessibility of the file/directory [4mpath[24m according to the  bit  pattern
      in [4mamode[24m using the real user ID.

      [4mpath[24m   specifies  the  logical  pathname  relative  to the current DPNS
             directory or the full DPNS pathname.

      [4mamode[24m  the bit pattern is built by an OR of the  constants  defined  in
             <[1munistd.h[22m>  under  Unix  or  to be explicitly defined under Win-

             [1mR_OK   [22mtest for read permission

             [1mW_OK   [22mtest for write permission

             [1mX_OK   [22mtest for search/execute permission

             [1mF_OK   [22mtest for existence of the directory/file.

      This routine returns 0 if the operation was successful  or  -1  if  the
      operation failed. In the latter case, [1mserrno [22mis set appropriately.

      [1mENOENT       [22mThe  named  file/directory does not exist or is a dangling
                   symbolic link.

      [1mEACCES       [22mSearch permission is denied on a  component  of  the  [4mpath[0m
                   prefix or specified access to the file itself is denied.

      [1mEFAULT       [4m[22mpath[24m is a NULL pointer.

      [1mENOTDIR      [22mA component of [4mpath[24m prefix is not a directory.

      [1mEINVAL       [4m[22mamode[24m is invalid.

      [1mENAMETOOLONG [22mThe  length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
                   a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.

      [1mSENOSHOST    [22mHost unknown.

      [1mSENOSSERV    [22mService unknown.

      [1mSECOMERR     [22mCommunication error.

      [1mENSNACT      [22mName server is not running or is being shutdown.

[1mSEE ALSO[0m
      [1mCastor_limits(4)[22m,             [1mdpns_chdir(3)[22m,             [1mdpns_chmod(3)[22m,
      [1mdpns_stat(3), dpns_statg(3)[0m

      [1mLCG Grid Deployment [22mTeam

DPNS         $Date: 2011-02-18 08:03:13 +0100 (Fri, 18 Feb 2011)D$PNS_ACCESS(3)