IFile.OpenBinaryReader

Syntax

OpenBinaryReader(FileName: String): IBinaryReader;

Parameters

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

Description

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

Example

Sub UserProc;
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 UserProc;

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

See also:

IFile