1LFC_READDIR(3)                    LFC      Library      Functions
2LFC_READDIR(3)
3
4
5
6[1mNAME[0m
7       lfc_readdir   ‐    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 <dirent.h>[0m
14       [1m#include "lfc_api.h"[0m
15
16       [1mstruct        dirent        *lfc_readdir       (lfc_DIR
17*[4m[22mdirp[24m[1m)[0m
18
19[1mDESCRIPTION[0m
20       [1mlfc_readdir  [22mreads  the  LFC  directory  opened  by
21[1mlfc_opendir [22min  the  name
22       server.    This   routine returns a pointer to a structure
23containing the
24       current  directory  entry.   [1mlfc_readdir  [22mcaches  a
25variable number of  such
26       entries,   depending  on  the  filename  size, to minimize
27the number of
28       requests to the name server.
29
30       [4mdirp[24m   specifies  the  pointer  value  returned  by
31[1mlfc_opendir[22m.
32
33[1mNOTE[0m
34       Only  the  fields d_name, d_reclen and on  some  platforms
35d_namlen  are
36       filled.
37
38[1mRETURN VALUE[0m
39       This  routine  returns  a pointer to a structure  contain‐
40ing the current
41       directory entry if the operation was successful or NULL if
42the  end  of
43       the  directory  was reached or if  the  operation  failed.
44When the end of
45       the  directory  is  encountered, serrno is not changed. If
46the  operation
47       failed, [1mserrno [22mis set appropriately.
48
49       As  lfc_readdir returns a null pointer both at the end  of
50the directory
51       and  on error, an application wishing  to  check  for  er‐
52ror  situations
53       should set [1mserrno [22mto 0, then call lfc_readdir, then
54check [1mserrno [22mand if
55       it is non‐zero, assume an error has occurred.
56
57[1mERRORS[0m
58       [1mEBADF         [22mFile  descriptor  in DIR structure is
59invalid.
60
61       [1mEFAULT       [4m[22mdirp[24m is a NULL pointer.
62
63       [1mSECOMERR     [22mCommunication error.
64
65       [1mENSNACT      [22mName server is not running or is being
66shutdown.
67
68[1mSEE ALSO[0m
69       [1mlfc_closedir(3)[22m,            [1mlfc_opendirg(3)[22m,
70[1mlfc_rewinddir(3)[22m, [1mdirent[0m
71
72[1mAUTHOR[0m
73       [1mLCG Grid Deployment [22mTeam
74
75
76
77LFC                                                        $Date$
78LFC_READDIR(3)
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