telldir3
Return current location in directory stream
Usage
#include <dirent.h>
long telldir(DIR *dirp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
telldir():
_XOPEN_SOURCE
|| /* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
Library
Standard C library (libc, -lc)
Overview
The telldir() function returns the current location associated with the directory stream dirp.
Return value
On success, the telldir() function returns the current location in the directory stream. On error, -1 is returned, and errno is set to indicate the error.
Errors
- EBADF
-
Invalid directory stream descriptor dirp.
Attributes
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| telldir() | Thread safety | MT-Safe |
Releases
19 releases since Debian 1.1 (Buzz); the text changed 13 times.