|TELLDIR(3)||Linux Programmer's Manual||TELLDIR(3)|
long telldir(DIR *dirp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
telldir(): _XOPEN_SOURCE || /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
- Invalid directory stream descriptor dirp.
|telldir ()||Thread safety||MT-Safe|
In early filesystems, the value returned by telldir() was a simple file offset within a directory. Modern filesystems use tree or hash structures, rather than flat tables, to represent directories. On such filesystems, the value returned by telldir() (and used internally by readdir(3)) is a "cookie" that is used by the implementation to derive a position within a directory. Application programs should treat this strictly as an opaque value, making no assumptions about its contents.