1LFC_READDIRXC(3)                  LFC      Library      Functions
2LFC_READDIRXC(3)
3
4
5
6[1mNAME[0m
7       lfc_readdirxc   ‐    read    LFC   directory   opened   by
8[1mlfc_opendir [22min the name
9       server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "lfc_api.h"[0m
14
15       [1mstruct     lfc_direnstatc    *lfc_readdirxc    (lfc_DIR
16*[4m[22mdirp[24m[1m)[0m
17
18[1mDESCRIPTION[0m
19       [1mlfc_readdirxc [22mreads the  LFC  directory  opened  by
20[1mlfc_opendir [22min the name
21       server.    This   routine returns a pointer to a structure
22containing the
23       current directory entry including the [1mstat [22minforma‐
24tion and the  comment
25       associated.    [1mlfc_readdirxc   [22mcaches   a  variable
26number of such entries,
27       depending on the filename size, to minimize the number  of
28requests  to
29       the name server.
30
31       [4mdirp[24m    specifies  the  pointer  value  returned by
32[1mlfc_opendir[22m.
33
34[1mRETURN VALUE[0m
35       This  routine  returns  a pointer to a structure  contain‐
36ing the current
37       directory entry if the operation was successful or NULL if
38the  end  of
39       the  directory  was reached or if  the  operation  failed.
40When the end of
41       the  directory  is  encountered, serrno is not changed. If
42the  operation
43       failed, [1mserrno [22mis set appropriately.
44
45       As  lfc_readdirxc  returns a null pointer both at the  end
46of the direc‐
47       tory and on error, an application wishing to check for er‐
48ror situations
49       should  set [1mserrno [22mto 0, then  call  lfc_readdirxc,
50then check [1mserrno [22mand
51       if it is non‐zero, assume an error has occurred.
52
53[1mERRORS[0m
54       [1mEBADF         [22mFile  descriptor  in DIR structure is
55invalid.
56
57       [1mEFAULT       [4m[22mdirp[24m is a NULL pointer.
58
59       [1mSECOMERR     [22mCommunication error.
60
61       [1mENSNACT      [22mName server is not running or is being
62shutdown.
63
64[1mSEE ALSO[0m
65       [1mlfc_closedir(3)[22m,            [1mlfc_opendirg(3)[22m,
66[1mlfc_rewinddir(3)[22m,  [1mlfc_setcomment[22m(3)[1m,[0m
67       [1mstat(2)[0m
68
69[1mAUTHOR[0m
70       [1mLCG Grid Deployment [22mTeam
71
72
73
74LFC                                                        $Date$
75LFC_READDIRXC(3)
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum