Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/r/readdir_r.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/r/readdir_r.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/r/readdir_r.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/r/readdir_r.html on line 8
Get information about the next matching filename
#include <sys/types.h>
#include <dirent.h>
int readdir_r( DIR * dirp,
struct dirent * entry,
struct dirent ** result );
- dirp
- A pointer to the directory stream to be read.
- entry
- A pointer to a
dirent
structure where the function
can store the directory entry.
- result
- The address of a location where the function can store a pointer to
the information found.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
If _POSIX_THREAD_SAFE_FUNCTIONS is defined,
readdir_r() initializes the dirent
structure referenced by entry with the directory
entry at the current position in the directory stream referred to by
dirp, and stores a pointer to this structure in
result.
The storage pointed by entry must be large enough for a
dirent structure with the s_name member an
array of char containing at least NAME_MAX plus one
element.
|
The struct dirent structure doesn't include space
for the pathname; you must provide it.
For example:
struct dirent *entry;
entry = malloc( offsetof(struct dirent, d_name) + NAME_MAX + 1 );
|
- EOK
- Success.
- EBADF
- The dirp argument doesn't refer to an open directory stream.
- EOVERFLOW
- One of the values in the structure to be returned can't be represented
correctly.
POSIX 1003.1 TSF
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
closedir(),
dirent,
errno,
opendir(),
readdir(),
seekdir(),
telldir(),
rewinddir()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/r/readdir_r.html on line 174
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/r/readdir_r.html on line 174