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
None.
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
closedir() ,mkdir() ,readdir() ,rewinddir() ,rmdir() ,seekdir() ,telldir()
MKS Toolkit 9.3 Documentation Build 6.