dpns_accessr man page

DPNS_ACCESSR(3)             DPNS Library Functions             DPNS_ACCESSR(3)

      dpns_accessr - check existence/accessibility of a file replica

      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_accessr (const char *[4m[22msfn[24m[1m, int [4m[22mamode[24m[1m);[0m

      [1mdpns_accessr  [22mchecks  in  the name server database the existence or the
      accessibility of the file replica [4msfn[24m according to the bit  pattern  in
      [4mamode[24m using the real user ID.

      [4msfn[24m    is  either  the  Site  URL  or  the  Physical  File Name for the

      [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 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 does not exist.

      [1mEACCES       [22mSearch  permission  is denied on a component of the parent
                   file prefix, the specified access to the  file  itself  is
                   denied  or W_OK is requested but the replica status is not
                   'P' (cannot modify an existing file).

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

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

      [1mENAMETOOLONG [22mThe length of [4msfn[24m exceeds [1mCA_MAXSFNLEN[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_chmod(3)[22m, [1mdpns_statr(3)[0m

      [1mLCG Grid Deployment [22mTeam

DPNS         $Date: 2010-04-05 09:51:26 +0200 (Mon, 05 Apr 2010)DP$NS_ACCESSR(3)