1SEEKDIR(3)                 Linux Programmer's Manual                SEEKDIR(3)
2
3
4

NAME

6       seekdir  - set the position of the next readdir() call in the directory
7       stream.
8

SYNOPSIS

10       #include <dirent.h>
11
12       void seekdir(DIR *dirp, long loc);
13
14   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16       seekdir():
17        _XOPEN_SOURCE
18           || /* Glibc since 2.19: */ _DEFAULT_SOURCE
19           || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
20

DESCRIPTION

22       The seekdir() function sets the location in the directory  stream  from
23       which  the next readdir(2) call will start.  The loc argument should be
24       a value returned by a previous call to telldir(3).
25

RETURN VALUE

27       The seekdir() function returns no value.
28

ATTRIBUTES

30       For  an  explanation  of  the  terms  used   in   this   section,   see
31       attributes(7).
32
33       ┌──────────┬───────────────┬─────────┐
34Interface Attribute     Value   
35       ├──────────┼───────────────┼─────────┤
36seekdir() │ Thread safety │ MT-Safe │
37       └──────────┴───────────────┴─────────┘

CONFORMING TO

39       POSIX.1-2001, POSIX.1-2008, 4.3BSD.
40

NOTES

42       In  glibc  up to version 2.1.1, the type of the loc argument was off_t.
43       POSIX.1-2001 specifies long, and this is  the  type  used  since  glibc
44       2.1.2.   See telldir(3) for information on why you should be careful in
45       making any assumptions about the value in this argument.
46

SEE ALSO

48       lseek(2),  closedir(3),  opendir(3),  readdir(3),  rewinddir(3),  scan‐
49       dir(3), telldir(3)
50

COLOPHON

52       This  page  is  part of release 5.02 of the Linux man-pages project.  A
53       description of the project, information about reporting bugs,  and  the
54       latest     version     of     this    page,    can    be    found    at
55       https://www.kernel.org/doc/man-pages/.
56
57
58
59                                  2016-03-15                        SEEKDIR(3)
Impressum