#include <sys/types.h> #include <dirent.h> struct dirent *cfg_readdir( DIR *dirp );
The cfg_readdir()
function returns a pointer to a structure dirent
representing the next directory entry from the directory stream pointed to
by dirp
. On end-of-file, NULL is returned.
The cfg_readdir()
function may (or may not) return entries for . or .. Your
program should tolerate reading dot and dot-dot but not require them.
The data pointed to be cfg_readdir()
may be overwritten by another call to
readdir()
for the same directory stream. It will not be overwritten by
a call for another directory.
If ptr
is not a pointer returned by malloc()
, calloc()
, or
realloc()
or has been deallocated with free()
or realloc()
,
the results are not portable and are probably disastrous.
This function is not defined in the POSIX specification. It is an extension provided by this implementation.
Copyright © 1988-2004 OAR Corporation