Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: July 2017
 
 

telldir(3C)

Name

telldir - current location of a named directory stream

Synopsis

#include <dirent.h> 

long int telldir(DIR *dirp);

Description

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

If the most recent operation on the directory stream was a seekdir(3C), the directory position returned from the telldir() is the same as that supplied as a loc argument for seekdir().

Return Values

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

Errors

The telldir() function will fail if:

EOVERFLOW

The current location of the directory cannot be stored in an object of type long.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe
Standard

See Also

opendir(3C), readdir(3C), seekdir(3C), attributes(5), standards(5)