COHERENT manpages
This page displays the COHERENT manpage for seekdir() [Reset the position within a directory stream].
List of available manpages
Index
seekdir() -- General Function (libc) Reset the position within a directory stream void seekdir (dirp, loc) DIR *dirp; off_t loc; The function seekdir() is one of a set of COHERENT routines that manipulate directories in a device-independent manner. It resets the current position within the directory stream pointed to by dirp to loc. loc must be a position indicator returned by a previous call to telldir(). If an error occurs, seekdir() exits and sets errno to an appropriate value. See Also closedir(), dirent.h, getdents(), libc, opendir(), readdir(), rewinddir(), telldir() Notes telldir() and seekdir() are unreliable when the directory stream has been closed and reopened. It is best to avoid using telldir() and seekdir() altogether. Because directory entries can dynamically appear and disappear, and because directory contents are buffered by these routines, an application may need to continually rescan a directory to maintain an accurate picture of its active entries. The COHERENT implementation of the dirent routines was written by D. Gwynn.