IFileInfo.OpenBinaryReader

Syntax

OpenBinaryReader: IBinaryReader;

Description

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

Example

Sub UserProc;
Var
    File1: IFileInfo;
    BinR: IBinaryReader;
    d: DateTime;
Begin
    File1:=New FileInfo.Attach("c:\Work\1.txt");
    If File1.Exists Then
        BinR:=File1.OpenBinaryReader;
        d:=BinR.ReadDateTime;
    End If;
    Dispose File1;
End Sub UserProc;

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

See also:

IFileInfo