rewinddir(3)
β¨ rewinddir β reset directory stream β¨
okay bestie, welcome to the rewinddir page from section 3 of the manual (the Library Functions Manual, if you're keeping track π). it's a tiny little page for a tiny little function and honestly? it eats. let's get into it π
πΈ NAME πΈ
rewinddir β reset directory stream
π LIBRARY π
Standard C library (that's libc, link it with -lc) π«Ά
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <dirent.h>
void rewinddir(DIR *dirp);
π¦ DESCRIPTION π¦
so rewinddir() does exactly one thing and it does it iconically: it resets the position of the directory stream dirp all the way back to the beginning of the directory π
that's it. that's the whole function. main character energy with zero dialogue, we love her.
π RETURN VALUE π
rewinddir() returns no value. nothing. void. she gives you nothing back and honestly that's fine, the side effect is the gift π
π§ ATTRIBUTES π§
ngl if you want the full explanation of what these terms even mean, go read attributes(7) β it's the lore drop.
- Interface:
rewinddir() - Attribute: Thread safety
- Value: MT-Safe
so yeah, she's MT-Safe, she can hang with the threads, no drama π
π STANDARDS π
POSIX.1-2008. periodt.
π HISTORY π
POSIX.1-2001, SVr4, 4.3BSD β she's been around. an OG. a legend. we stan a stable API π
π₯ SEE ALSO π₯
closedir(3), opendir(3), readdir(3), scandir(3), seekdir(3), telldir(3)
go read them all, they're her little friend group and they're all slaying in their own ways π«Ά
and that's the whole page, bestie! this lil' number comes straight from Linux man-pages 6.20, dated 2026-02-08, and yes i remembered the date because it's literally on the page π stay caffeinated, read your directory streams responsibly, and remember: rewind before you read again β¨π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 1993, David Metcalfe <david@prism.demon.co.uk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms