3 directory, opendir, readdir, rewinddir, closedir, telldir, seekdir \- directory routines
10 DIR *opendir(const char *\fIdirname\fP)
11 struct dirent *readdir(DIR *\fIdirp\fP)
12 void rewinddir(DIR *\fIdirp\fP)
13 int closedir(DIR *\fIdirp\fP)
16 #include <sys/types.h>
19 long telldir(DIR *\fIdirp\fP)
20 int seekdir(DIR *\fIdirp\fP, long \fIpos\fP)
22 These routines form a system independent interface to access directories.
27 and returns a pointer to this open directory stream.
30 reads one entry from the directory as a pointer to a structure containing
33 a character array containing the null-terminated name of the entry.
36 allows the directory to be read again from the beginning.
39 closes the directory and releases administrative data.
41 The MINIX 3 specific functions
45 allow one to get the current position in the directory file and to return
48 may only be called with a position returned by
50 or 0 (rewind). These functions should not be used in portable programs.
55 returns a null pointer if
57 can't be opened, or if it can't allocate enough memory for the
62 returns null if there are no more directory entries or on error.
67 returns 0 on success, -1 on error.
78 on error, not on end-of-dir, so you should set
80 to zero beforehand, and check its value if
86 needs to be copied before the next operation on the same directory if it is
89 Kees J. Bot (kjb@cs.vu.nl)