TELLDIR(3POSIX)
π TELLDIR(3POSIX) π
okay bestie, welcome to the POSIX Programmer's Manual β this one's telldir, from section 3, and it's literally the chillest little function you'll ever meet β¨
πΈ PROLOG πΈ
okay so first things first, some housekeeping π«Ά
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. so like... check before you commit, bestie π
π NAME π
telldir β current location of a named directory stream π
(it's giving "where are we rn" but for directories, no cap)
β¨ SYNOPSIS β¨
#include <dirent.h>
long telldir(DIR *dirp);
look at her. one include, one line, one long. iconic behavior fr fr π
π DESCRIPTION π
okay so the telldir() function shall obtain the current location associated with the directory stream specified by dirp. that's it. that's the whole vibe. she just tells you where you're at π
and here's the cute part: if the most recent operation on the directory stream was a seekdir(), the directory position returned from the telldir() shall be the same as that supplied as a loc argument for seekdir(). so like, you seeked, and now she tells you back exactly the same spot you gave her. mutual trust. main character energy π«Ά
π₯ RETURN VALUE π₯
Upon successful completion, telldir() shall return the current location of the specified directory stream. slay π
that's your number. that's your position. go off queen π
π ERRORS π
No errors are defined. literally nothing can go wrong here (allegedly π). she's that stable.
The following sections are informative.
π¦ EXAMPLES π¦
None.
(she's too powerful for examples, apparently π)
π APPLICATION USAGE π
None.
π§ RATIONALE π§
None.
β FUTURE DIRECTIONS β
None.
π SEE ALSO π
fdopendir()readdir()seekdir()
The Base Definitions volume of POSIX.1β2017, <dirent.h>
like yeah, go read the whole squad, they're all connected π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
fr fr, if you spot a typo it's probably the conversion's fault, not the Standard's β the Standard is the referee document, periodt π
and that's a wrap bestie!! π this page came to you courtesy of IEEE/The Open Group, dated 2017, under the manual name TELLDIR(3POSIX) β stay hydrated, keep your directory streams close, and go telldir() responsibly πβ¨π¦
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms