delorie.com/djgpp/doc/libc/libc_602.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <dirent.h> extern int __opendir_flags; DIR *opendir(char *name); |
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. See section readdir.
The global variable __opendir_flags
can be set to include the
following values to control the operation of opendir
:
__OPENDIR_PRESERVE_CASE
You can also use this flag if you want the names of files like `README' and `FAQ' from Unix distributions to be returned in upper-case on Windows 9X filesystems. See section _preserve_fncase, for other ways of achieving this and for more detailed description of the automatic letter-case conversion by DJGPP library functions.
__OPENDIR_NO_HIDDEN
__OPENDIR_FIND_HIDDEN
__OPENDIR_FIND_LABEL
__OPENDIR_NO_D_TYPE
d_type
member of struct dirent
. If
this flag is set, all files will get DT_UNKNOWN
in the
d_type
member. By default, this flag is reset. See section readdir.
You can simply put `int __opendir_flags = ...;' in your code. The default is to let it get set to zero as an uninitialized variable.
The open directory structure, or NULL
on error.
ANSI/ISO C | No |
POSIX | 1003.2-1992; 1003.1-2001 (see note 1) |
Notes:
__opendir_flags
variable is DJGPP-specific.
DIR *d = opendir("."); closedir(d); |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |