<< Previous | Next >>

ftell (FS2)

long ftell( File * f );

Description

Return the current read/write position of the file. Bytes in a file are sequentially numbered starting at zero. If the current position is zero, then the first byte of the file will be read or written. If the position equals the file length, then no data can be read, but any write will append data to the file.

Note that no checking is done to see if the file descriptor s valid. If the File is not actually open, the return value will be random.

Parameters

f
Pointer to file descriptor (initialized by fopen_rd(), fopen_wr() or fcreate()).

Return value

Current read/write position (0 to length-of-file).

ERRNO values

None

Library

fs2.lib

See also

fseek (FS2)


Dynamic C Functions << Previous | Next >> rabbit.com