1LFC_READDIR(3) LFC Library Functions LFC_READDIR(3)
2
3
4
6 lfc_readdir - read LFC directory opened by lfc_opendir in the name
7 server
8
10 #include <sys/types.h>
11 #include <dirent.h>
12 #include "lfc_api.h"
13
14 struct dirent *lfc_readdir (lfc_DIR *dirp)
15
17 lfc_readdir reads the LFC directory opened by lfc_opendir in the name
18 server. This routine returns a pointer to a structure containing the
19 current directory entry. lfc_readdir caches a variable number of such
20 entries, depending on the filename size, to minimize the number of
21 requests to the name server.
22
23 dirp specifies the pointer value returned by lfc_opendir.
24
26 Only the fields d_name, d_reclen and on some platforms d_namlen are
27 filled.
28
30 This routine returns a pointer to a structure containing the current
31 directory entry if the operation was successful or NULL if the end of
32 the directory was reached or if the operation failed. When the end of
33 the directory is encountered, serrno is not changed. If the operation
34 failed, serrno is set appropriately.
35
36 As lfc_readdir returns a null pointer both at the end of the directory
37 and on error, an application wishing to check for error situations
38 should set serrno to 0, then call lfc_readdir, then check serrno and if
39 it is non-zero, assume an error has occurred.
40
42 EBADF File descriptor in DIR structure is invalid.
43
44 EFAULT dirp is a NULL pointer.
45
46 SENOSSERV Service unknown.
47
48 SECOMERR Communication error.
49
50 ENSNACT Name server is not running or is being shutdown.
51
53 lfc_closedir(3), lfc_opendirg(3), lfc_rewinddir(3), dirent
54
56 LCG Grid Deployment Team
57
58
59
60LFC $Date: 2010-12-13 08:41:11 +0100 (Mon, 13 Dec 2010)L$FC_READDIR(3)