IFile.AppendBinary

Syntax

AppendBinary(FileName: String): IBinaryWriter;

Parameters

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

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

BynW: IBinaryWriter;

Begin

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

BynW:=File.AppendBinary("c:\New_folder\1.txt");

BynW.WriteDateTime(DateTime.Now);

End If;

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:

IFile