Section: Linux Programmer's Manual (3)
Return to Main Contents
telldir - return current location in directory stream
long telldir(DIR *dirp);
Feature Test Macro Requirements for glibc (see
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
function returns the current location associated with
the directory stream dirp.
On success, the
function returns the current location
in the directory stream.
On error, -1 is returned, and
is set appropriately.
Invalid directory stream descriptor dirp.
Multithreading (see pthreads(7))
function is thread-safe.
In glibc up to version 2.1.1, the return type of
and this is the type used since glibc 2.1.2.
In early filesystems, the value returned by
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
(and used internally by
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
assumptions about its contents.
This page is part of release 3.54 of the Linux
A description of the project,
and information about reporting bugs,
can be found at
- RETURN VALUE
- Multithreading (see pthreads(7))
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 05:35:15 GMT, January 19, 2018