telldir man page


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.

telldir — current location of a named directory stream


#include <dirent.h>

long telldir(DIR *dirp);


The telldir() function shall obtain the current location associated with the directory stream specified by dirp.

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().

Return Value

Upon successful completion, telldir() shall return the current location of the specified directory stream.


No errors are defined.

The following sections are informative.

See Also

fdopendir(), readdir(), seekdir()

The Base Definitions volume of POSIX.1‐2008, <dirent.h>