Name

wrewinddir - resets the position of the directory stream (directory with wide-character name)

Library

libc.lib

Synopsis

  #include <wchar.h>
  #include <dirent.h>
  void wrewinddir (WDIR *dirp);


Return values

The wrewinddir function returns no value.


Detailed description

The wrewinddir function function resets the position of the named directory stream pointed by ‘dirp’ to the beginning of the directory.



Examples

 /**
  * Detailed description: Sample usage of wreaddir call
  * Preconditions:  Example Directory should be present in current working directory and should contain say 4 files/directories.
**/
#include <dirent.h>
#include <unistd.h>
#include <wchar.h>
int main()
{
  WDIR *dirName;
  off_t offset;
  struct wdirent *Dir;
  dirName = wopendir(L"Example");
  if(dirName == NULL )  {
     printf("Failed to open directory \n");
     return -1;
  }
  wseekdir(dirName, 3)
  if((offset = wtelldir(dirName))!= 3)  {
    printf("failed  \n");
    return -1;
  }
  wrewindir(dirName);
  if((offset = wtelldir(dirName))!= 0)  {
    printf("failed  \n");
    return -1;
  }
 printf("Successful\n");
 wclosedir(dirName);
 return 0;
}

         

Output

Successful

         


See also

wreaddir, wtelldir, wseekdir, readdir, rewinddir, telldir, seekdir,

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top