dpns_statg man page

DPNS_STATG(3)               DPNS Library Functions               DPNS_STATG(3)

      dpns_statg - get information about a DPNS file or directory in the name

      [1m#include <sys/types.h>[0m
      [1m#include "dpns_api.h"[0m

      [1mint  dpns_statg  (const  char   *[4m[22mpath[24m[1m,   const   char   *[4m[22mguid,[24m   [1mstruct[0m
      [1mdpns_filestatg *[4m[22mstatbuf[24m[1m)[0m

      [1mint dpns_statr (const char *[4m[22msfn[24m[1m, struct dpns_filestatg *[4m[22mstatbuf[24m[1m)[0m

      [1mdpns_statg  [22mgets information about a DPNS file or directory, having the
      given GUID, in the name server.

      [1mdpns_statr [22mretrieves information about the given replica.

      The file can be specified by [4mpath[24m name or by [4mguid[24m.  If both are  given,
      they must point at the same file.

      [4mguid[24m   specifies the Grid Unique IDentifier.

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

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

      The structure pointed to by [4mstatbuf[24m contains the following members:
             u_signed64     fileid;             /* entry unique identifier */
             char      guid[CA_MAXGUIDLEN+1]    /* GUID */
             mode_t         filemode;      /* see below */
             int       nlink;              /*  number of files in a directory
             uid_t          uid;
             gid_t          gid;
             u_signed64     filesize;
             time_t         atime;              /* last access to file */
             time_t         mtime;              /* last file modification */
             time_t         ctime;              /* last metadata modification
             short          fileclass;          /*  1-->  experiment,  2  -->
             user */
             char      status;             /*  '-'  -->   online,   'm'   -->
             migrated */
             char      csumtype[3];
             char      csumvalue[33];

      filemode  is  constructed  by  OR'ing  the bits defined in <[1msys/stat.h[22m>
      under Unix or  [1m"statbits.h" [22munder Windows/NT:

             [1mS_IFLNK   0xA000          [22msymbolic link
             [1mS_IFREG   0x8000          [22mregular file
             [1mS_IFDIR   0x4000          [22mdirectory
             [1mS_ISUID   0004000         [22mset user ID on execution
             [1mS_ISGID   0002000         [22mset group ID on execution
             [1mS_ISVTX   0001000         [22msticky bit
             [1mS_IRUSR   0000400         [22mread by owner
             [1mS_IWUSR   0000200         [22mwrite by owner
             [1mS_IXUSR   0000100         [22mexecute/search by owner
             [1mS_IRGRP   0000040         [22mread by group
             [1mS_IWGRP   0000020         [22mwrite by group
             [1mS_IXGRP   0000010         [22mexecute/search by group
             [1mS_IROTH   0000004         [22mread by others
             [1mS_IWOTH   0000002         [22mwrite by others
             [1mS_IXOTH   0000001         [22mexecute/search by others

      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 null path-

      [1mEACCES       [22mSearch permission is denied on a  component  of  the  [4mpath[0m

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

      [1mEINVAL       [22mThe  length of the [4mguid[24m component exceeds [1mCA_MAXGUIDLEN [22mor
                   path and guid are both given and they point at a different

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

      [1mENAMETOOLONG [22mThe  length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
                   a [4mpath[24m component exceeds [1mCA_MAXNAMELEN [22mor  the  length  of
                   the [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_chdir(3)[22m,    [1mdpns_chmod(3)[22m,    [1mdpns_chown(3)[22m,

      [1mLCG Grid Deployment [22mTeam

DPNS                     $Date: 2005/04/28 05:20:20 $            DPNS_STATG(3)

Referenced By

dpns_access(3), dpns_creat(3), dpns_readlink(3), dpns_setatime(3), dpns_symlink(3), dpns_umask(3), dpns_utime(3).

dpns_statr(3) is an alias of dpns_statg(3).