]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da MK |
2 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
5 | .\" |
6 | .\" References consulted: | |
7 | .\" Linux libc source code | |
8 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
9 | .\" 386BSD man pages | |
10 | .\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu) | |
73f4bf1e | 11 | .\" |
4c1c5274 | 12 | .TH seekdir 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
13 | .SH NAME |
14 | seekdir \- set the position of the next readdir() call in the directory | |
15 | stream. | |
63c15895 AC |
16 | .SH LIBRARY |
17 | Standard C library | |
8fc3b2cf | 18 | .RI ( libc ", " \-lc ) |
fea681da MK |
19 | .SH SYNOPSIS |
20 | .nf | |
21 | .B #include <dirent.h> | |
68e4db0a | 22 | .PP |
73f4bf1e | 23 | .BI "void seekdir(DIR *" dirp ", long " loc ); |
fea681da | 24 | .fi |
68e4db0a | 25 | .PP |
d39ad78f | 26 | .RS -4 |
cc4615cc MK |
27 | Feature Test Macro Requirements for glibc (see |
28 | .BR feature_test_macros (7)): | |
d39ad78f | 29 | .RE |
68e4db0a | 30 | .PP |
cc4615cc | 31 | .BR seekdir (): |
9d281e06 | 32 | .nf |
38c1dbe9 | 33 | _XOPEN_SOURCE |
75c018a1 AC |
34 | || /* glibc >= 2.19: */ _DEFAULT_SOURCE |
35 | || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE | |
9d281e06 | 36 | .fi |
fea681da | 37 | .SH DESCRIPTION |
60a90ecd MK |
38 | The |
39 | .BR seekdir () | |
40 | function sets the location in the directory stream | |
41 | from which the next | |
42 | .BR readdir (2) | |
43 | call will start. | |
73f4bf1e MK |
44 | The |
45 | .I loc | |
46 | argument should be a value returned by a previous call to | |
60a90ecd | 47 | .BR telldir (3). |
47297adb | 48 | .SH RETURN VALUE |
60a90ecd MK |
49 | The |
50 | .BR seekdir () | |
51 | function returns no value. | |
bbb97a01 | 52 | .SH ATTRIBUTES |
79e5ca24 PH |
53 | For an explanation of the terms used in this section, see |
54 | .BR attributes (7). | |
55 | .TS | |
56 | allbox; | |
c466875e | 57 | lbx lb lb |
79e5ca24 PH |
58 | l l l. |
59 | Interface Attribute Value | |
60 | T{ | |
9e54434e BR |
61 | .na |
62 | .nh | |
bbb97a01 | 63 | .BR seekdir () |
79e5ca24 PH |
64 | T} Thread safety MT-Safe |
65 | .TE | |
c466875e | 66 | .sp 1 |
3113c7f3 | 67 | .SH STANDARDS |
4131356c AC |
68 | POSIX.1-2008. |
69 | .SH HISTORY | |
70 | POSIX.1-2001, 4.3BSD. | |
71 | .SH CAVEATS | |
b324e17d | 72 | Up to glibc 2.1.1, the type of the |
73f4bf1e | 73 | .I loc |
fc3c831d MK |
74 | argument was |
75 | .IR off_t . | |
76 | POSIX.1-2001 specifies | |
77 | .IR long , | |
78 | and this is the type used since glibc 2.1.2. | |
73f4bf1e MK |
79 | See |
80 | .BR telldir (3) | |
81 | for information on why you should be careful in making any | |
82 | assumptions about the value in this argument. | |
47297adb | 83 | .SH SEE ALSO |
fea681da MK |
84 | .BR lseek (2), |
85 | .BR closedir (3), | |
86 | .BR opendir (3), | |
87 | .BR readdir (3), | |
88 | .BR rewinddir (3), | |
89 | .BR scandir (3), | |
90 | .BR telldir (3) |