IFileInfo.AppendBinary

Syntax

AppendBinary: IBinaryWriter;

Description

The AppendBinary method opens a file for writing in a binary format and puts a cursor to the end of a file.

Example

Sub Main;

Var

File1: IFileInfo;

BynW: IBinaryWriter;

Begin

File1:=New FileInfo.Attach("c:\Work\1.txt");

If File1.Exists Then

BynW:=File1.AppendBinary;

BynW.WriteDateTime(DateTime.Now);

End If;

Dispose File1;

End Sub Main;

After executing the example the current date and time converted into a binary format are written into the end of the 1.txt file.

See also:

IFileInfo