1rewinddir(3C) Standard C Library Functions rewinddir(3C)
2
3
4
6 rewinddir - reset position of directory stream to the beginning of a
7 directory
8
10 #include <sys/types.h>
11 #include <dirent.h>
12
13 void rewinddir(DIR *dirp);
14
15
17 The rewinddir() function resets the position of the directory stream to
18 which dirp refers to the beginning of the directory. It also causes the
19 directory stream to refer to the current state of the corresponding
20 directory, as a call to opendir(3C) would have done. If dirp does not
21 refer to a directory stream, the effect is undefined.
22
23
24 After a call to the fork(2) function, either the parent or child (but
25 not both) may continue processing the directory stream using read‐
26 dir(3C), rewinddir() or seekdir(3C). If both the parent and child pro‐
27 cesses use these functions, the result is undefined.
28
30 The rewinddir() function does not return a value.
31
33 No errors are defined.
34
36 The rewinddir() function should be used in conjunction with opendir(),
37 readdir(), and closedir(3C) to examine the contents of the directory.
38 This method is recommended for portability.
39
41 See attributes(5) for descriptions of the following attributes:
42
43
44
45
46 ┌─────────────────────────────┬─────────────────────────────┐
47 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
48 ├─────────────────────────────┼─────────────────────────────┤
49 │Interface Stability │Standard │
50 ├─────────────────────────────┼─────────────────────────────┤
51 │MT-Level │Safe │
52 └─────────────────────────────┴─────────────────────────────┘
53
55 fork(2), closedir(3C), opendir(3C), readdir(3C), seekdir(3C),
56 attributes(5), standards(5)
57
58
59
60SunOS 5.11 14 Aug 2002 rewinddir(3C)