System.FilePos

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FilePos(var F: File): Integer;

Properties

Type Visibility Source Unit Parent
function public System.pas System System

Description

Returns the current file position.

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 beginning, FilePos returns 0. Otherwise, FilePos returns the byte offset from the beginning of the current position.

FilePos does work on a file that is not open.

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

See Also


Code Examples