#include <wchar.h>
|
|
WDIR *
wopendir (const wchar_t *dirname); |
The wopendir function returns a pointer to the directory stream or NULL if an error occurred.
/*************************************************************************************************************
* Detailed description: This test code demonstrates usage of wopendir system call, open directory wide name "test".
*
* Preconditions: Expects "test" directory to be present in the current working directory.
**************************************************************************************************************/
#include <wchar.h>
#include <stdio.h>
#include <dirent.h>
int main()
{
WDIR *WDirHandle;
if(!(WDirHandle = wopendir(L"test") ) )
{
printf("Failed to open directory test\n");
return -1;
}
printf("Directory test opened \n");
wclosedir(WDirHandle);
return 0;
}
Output
Directory test opened
| [EINVAL] | |
| Invalid argument. | |
| [ENAMETOOLONG] | |
| A component of a pathname exceeded 255 characters. | |
| [ENOENT] | |
| The named file does not exist. | |
| [EMFILE] | |
| Too many file descriptors in use by process. | |
| [ENOMEM] | |
| Insufficient memory to complete the operation. | |
| [ENOTDIR] | |
| dirname is not a directory. | |
|
© 2005-2007 Nokia |