IFile.OpenBinaryReader

Syntax

OpenBinaryReader(FileName: String): IBinaryReader;

Parameters

FileName — a path and name of the file that should be opened.

Description

The OpenBinaryReader method opens a file for reading in a binary format.

Example

Sub Main;

Var

BinR: IBinaryReader;

d: DateTime;

Begin

If File.Exists("c:\New_folder\1.txt") Then

BinR:=File.OpenBinaryReader("c:\New_folder\1.txt");

d:=BinR.ReadDateTime;

End If;

End Sub Main;

After executing this example, date and time are obtained into a variable "d" from a file 1.txt.

See also:

IFile