Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/gen/directory.3
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | |||||
.Dv DIR | .Dv DIR | ||||
pointer, | pointer, | ||||
.Fa dirp , | .Fa dirp , | ||||
from which they are derived. | from which they are derived. | ||||
If the directory is closed and then | If the directory is closed and then | ||||
reopened, prior values returned by | reopened, prior values returned by | ||||
.Fn telldir | .Fn telldir | ||||
will no longer be valid. | will no longer be valid. | ||||
Values returned by | |||||
.Fn telldir | |||||
are also invalidated by a call to | |||||
.Fn rewinddir . | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn seekdir | .Fn seekdir | ||||
function | function | ||||
sets the position of the next | sets the position of the next | ||||
.Fn readdir | .Fn readdir | ||||
operation on the | operation on the | ||||
.Em directory stream . | .Em directory stream . | ||||
The new position reverts to the one associated with the | The new position reverts to the one associated with the | ||||
.Em directory stream | .Em directory stream | ||||
when the | when the | ||||
.Fn telldir | .Fn telldir | ||||
operation was performed. | operation was performed. | ||||
State associated with the token returned by | |||||
.Fn telldir is freed when it is passed to | |||||
.Fn seekdir . | |||||
If you wish return to the same location again, | |||||
then you must create a new token with another | |||||
.Fn telldir | |||||
call. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn rewinddir | .Fn rewinddir | ||||
function | function | ||||
resets the position of the named | resets the position of the named | ||||
.Em directory stream | .Em directory stream | ||||
to the beginning of the directory. | to the beginning of the directory. | ||||
.Pp | .Pp | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |