
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>opendir</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
opendir
=======
Syntax
------
#include <dirent.h>
extern int __opendir_flags;
DIR *opendir(char *name);
Description
-----------
This function "opens" a directory so that you can read the list of file
names in it. The pointer returned must be passed to `closedir' when
you are done with it. readdir:.
The global variable `__opendir_flags' can be set to include the
following values to control the operation of `opendir':
`__OPENDIR_PRESERVE_CASE'
Do not change the case of files to lower case. Just in case
Micros*ft decides to support case-sensitive file systems some day.
`__OPENDIR_FIND_HIDDEN'
Include hidden files and directories in the search. By default,
these are skipped.
You can simply put "int __opendir_flags = ...;" in your code. The
default is to let it get set to zero as an uninitialized variable.
Return Value
------------
The open directory structure, or `NULL' on error.
Example
-------
DIR *d = opendir(".");
closedir(d);
See Also: readdir
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson