Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

telldir - get current location of named directory stream

&pagelevel(4)&pagelevel

Syntax

#include <dirent.h>

long int telldir(DIR *dirp);

Description

Description telldir() returns the current location associated with the specified directory stream.
If seekdir() was the last operation on the directoy stream, then telldir() returns the position specified in the loc argument of the seekdir() call.

Return val.

Current location



if successful

 

Extension

 

-1

if an error occurs. errno is set to indicate the error. (End)

Errors

telldir() will fail if:

Extension

EBADF

The file descriptor associated with the directory is no longer valid. This error will occur if the directory was closed. (End)

Notes

telldir() is executed only for POSIX files

See also

readdir(), seekdir(), dirent.h.