The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

seekdir - set position of directory stream

 SYNOPSIS



#include <sys/types.h>
#include <dirent.h>

void seekdir(DIR *dirp, long int loc);

 DESCRIPTION

The seekdir() function sets the position of the next readdir() operation on the directory stream specified by dirp to the position specified by loc. The value of loc should have been returned from an earlier call to telldir(). The new position reverts to the one associated with the directory stream when telldir() was performed.

If the value of loc was not obtained from an earlier call to telldir() or if a call to rewinddir() occurred between the call to telldir() and the call to seekdir(), the results of subsequent calls to readdir() are unspecified.

 RETURN VALUE

The seekdir() function returns no value.

 ERRORS

No errors are defined.

 EXAMPLES

None.

 APPLICATION USAGE

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

opendir(), readdir(), telldir(), <dirent.h> <stdio.h>, <sys/types.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]