1DPNS_STATG(3)                    DPNS      Library      Functions
2DPNS_STATG(3)
3
4
5
6[1mNAME[0m
7       dpns_statg ‐ get information about a DPNS file or directo‐
8ry in the name
9       server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "dpns_api.h"[0m
14
15       [1mint   dpns_statg   (const   char   *[4m[22mpath[24m[1m,
16const   char   *[4m[22mguid,[24m   [1mstruct[0m
17       [1mdpns_filestatg *[4m[22mstatbuf[24m[1m)[0m
18
19       [1mint dpns_statr (const char  *[4m[22msfn[24m[1m,  struct
20dpns_filestatg *[4m[22mstatbuf[24m[1m)[0m
21
22[1mDESCRIPTION[0m
23       [1mdpns_statg   [22mgets  information about a DPNS file or
24directory, having the
25       given GUID, in the name server.
26
27       [1mdpns_statr [22mretrieves information  about  the  given
28replica.
29
30       The  file  can  be  specified  by  [4mpath[24m  name or by
31[4mguid[24m.  If both are  given,
32       they must point at the same file.
33
34       [4mguid[24m   specifies the Grid Unique IDentifier.
35
36       [4mpath[24m   specifies  the  logical  pathname   relative
37to the current DPNS
38              directory or the full DPNS pathname.
39
40       [4msfn[24m     is  either the Site  URL  or  the  Physical
41File  Name  for  the
42              replica.
43
44       The structure pointed to by  [4mstatbuf[24m  contains  the
45following members:
46              u_signed64      fileid;             /* entry unique
47identifier */
48              char      guid[CA_MAXGUIDLEN+1]    /* GUID */
49              mode_t         filemode;      /* see below */
50              int       nlink;              /*  number  of  files
51in a directory
52              */
53              uid_t          uid;
54              gid_t          gid;
55              u_signed64     filesize;
56              time_t          atime;               /* last access
57to file */
58              time_t          mtime;               /*  last  file
59modification */
60              time_t         ctime;              /* last metadata
61modification
62              */
63              short          fileclass;          /*  1‐‐>  exper‐
64iment,  2  ‐‐>
65              user */
66              char       status;              /*   ’‐’  ‐‐>   on‐
67line,   ’m’   ‐‐>
68              migrated */
69              char      csumtype[3];
70              char      csumvalue[33];
71
72       filemode  is  constructed  by  OR’ing  the bits defined in
73<[1msys/stat.h[22m>
74       under Unix or  [1m"statbits.h" [22munder Windows/NT:
75
76              [1mS_IFLNK   0xA000          [22msymbolic link
77              [1mS_IFREG   0x8000          [22mregular file
78              [1mS_IFDIR   0x4000          [22mdirectory
79              [1mS_ISUID   0004000         [22mset user ID on ex‐
80ecution
81              [1mS_ISGID   0002000         [22mset  group  ID  on
82execution
83              [1mS_ISVTX   0001000         [22msticky bit
84              [1mS_IRUSR   0000400         [22mread by owner
85              [1mS_IWUSR   0000200         [22mwrite by owner
86              [1mS_IXUSR    0000100         [22mexecute/search by
87owner
88              [1mS_IRGRP   0000040         [22mread by group
89              [1mS_IWGRP   0000020         [22mwrite by group
90              [1mS_IXGRP   0000010         [22mexecute/search  by
91group
92              [1mS_IROTH   0000004         [22mread by others
93              [1mS_IWOTH   0000002         [22mwrite by others
94              [1mS_IXOTH    0000001         [22mexecute/search by
95others
96
97[1mRETURN VALUE[0m
98       This routine returns 0 if the operation was successful  or
99‐1  if  the
100       operation failed. In the latter case, [1mserrno [22mis set
101appropriately.
102
103[1mERRORS[0m
104       [1mENOENT       [22mThe named file/directory does not  ex‐
105ist or is a null path‐
106                    name.
107
108       [1mEACCES       [22mSearch permission is denied on a  com‐
109ponent  of  the  [4mpath[0m
110                    prefix.
111
112       [1mEFAULT       [4m[22mpath[24m  or  [4mstatbuf[24m  is  a
113NULL pointer.
114
115       [1mEINVAL        [22mThe  length of the [4mguid[24m compo‐
116nent exceeds [1mCA_MAXGUIDLEN [22mor
117                    path and guid are both given and  they  point
118at a different
119                    file.
120
121       [1mENOTDIR       [22mA  component of [4mpath[24m prefix is
122not a directory.
123
124       [1mENAMETOOLONG [22mThe   length  of  [4mpath[24m  exceeds
125[1mCA_MAXPATHLEN [22mor the length of
126                    a  [4mpath[24m  component  exceeds [1mCA_MAX‐
127NAMELEN [22mor  the  length  of
128                    the [4msfn[24m exceeds [1mCA_MAXSFNLEN[22m.
129
130       [1mSENOSHOST    [22mHost unknown.
131
132       [1mSENOSSERV    [22mService unknown.
133
134       [1mSECOMERR     [22mCommunication error.
135
136       [1mENSNACT      [22mName server is not running or is being
137shutdown.
138
139[1mSEE ALSO[0m
140       [1mCastor_limits(4)[22m,             [1mdpns_chdir(3)[22m,
141[1mdpns_chmod(3)[22m,    [1mdpns_chown(3)[22m,
142       [1mdpns_creat(3)[0m
143
144[1mAUTHOR[0m
145       [1mLCG Grid Deployment [22mTeam
146
147
148
149DPNS                        $Date:    2005/04/28    05:20:20    $
150DPNS_STATG(3)
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Impressum