tell64

Determines the current file position.

Library:LibC
Classification:Other
Service:File and Directory I/O

Syntax

  #include <unistd.h> 
   
  off64_t  tell64 (
     int   fildes);
  

Parameters

fildes

(IN) Specifies a file descriptor.

Return Values

If successful, returns the offset of the current file position relative to the beginning of the file. A value of zero indicates the start of the file.

If an error occurs, returns -1 and sets errno to one of the following:

Decimal

Constant

Description

4

EBADF

Invalid file descriptor.

33

ESPIPE

The file descriptor does not refer to a file.

Remarks

The fildes parameter is the file descriptor returned by a successful execution of the open, sopen, or creat. This function can be used in conjunction with lseek64 to reset the current file position.

The tell64 function is equivalent to tell except that it handles files larger than 2 GB.

See Also