SYNOPSIS
#include <sys/types.h>
#include <dirent.h>
DIR *opendir(const char *dirname);
DESCRIPTION
The
The type DIR (defined in <dirent.h>) represents
a directory stream, which is an ordered sequence of all the directory entries
in a particular directory. Directory entries represent files. Files can be
removed from or added to a directory asynchronously to the operation performed.
The
All the open directory streams are inherited to a forked child process.
After a call to
PARAMETERS
RETURN VALUES
If successful,
- EACCES
-
Search permission is denied for a component of the path name prefix of dirname or read permission is denied for the directory.
- ENAMETOOLONG
-
The length of the dirname parameter exceeds PATH_MAX or a path name component is longer than NAME_MAX.
- ENOENT
-
The named directory does not exist or dirname points to an empty string or a component of dirname is not a directory.
- ENOTDIR
-
The argument dirname does not refer to a directory.
- ENOMEM
-
Not enough memory to create the directory stream.
CONFORMANCE
POSIX.1 (1996).
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
Directory names are treated as multibyte sequences and are converted to Unicode (UTF-16)
before passing to Win32. The conversion is either performed based on the
current thread locale, set using
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
closedir() ,mkdir() ,readdir() ,rewinddir() ,rmdir() ,seekdir() ,telldir() ,xlocale()
PTC MKS Toolkit 10.5 Documentation Build 40.