RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.FilePos Function

Returns the current file position.

Pascal
function FilePos(var F): Longint;
C++
Longint FilePos( F);

System

In Delphi code, use FilePos on the file variable of an open file to determine the current position in the file. If the current position in the file is at the very beginning, FilePos returns 0. Otherwise, FilePos returns the byte offset from the beginning of the current position.  

FilePos will not work on a file that is not open.

Note: {$I+} handles runtime errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!