tell(), tell64()

report current byte position in file 

Function


SYNOPSIS

#include <sys/types.h>

#include <unistd.h>

off_t tell(int fildes);

off64_t tell64(int fildes);


DESCRIPTION

The tell() function reports the offset of the current byte relative to the beginning of the file associated with the file descriptor.

The tell64() function is identical to the tell() function except that it is capable of working with files that are larger than 2 gigabytes.


PARAMETERS

fildes 

Is the file descriptor of an open file.


RETURN VALUES

If successful, tell() and tell64() return the offset of the current byte relative to the beginning of the file associated with the file descriptor. Otherwise, they return -1 and set errno to one of the following values:

EBADF 

An invalid file descriptor was given.

ESPIPE 

The file descriptor refers to a pipe, FIFO, or socket.


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

The value returned by

tell(fd);

is the same as is returned by

lseek(fd, 0, SEEK_CUR);

AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
lseek()

Miscellaneous:
l64


PTC MKS Toolkit 10.4 Documentation Build 39.