AppendText(FileName: String): ITextWriter;
FileName — path and name of the file that must be opened.
The AppendText method opens a file for writing in a text format and puts a cursor to the end of a file.
Sub Main;
Var
TextW: ITextWriter;
Begin
If File.Exists("c:\New_folder\1.txt") Then
TextW:=File.AppendText("c:\New_folder\1.txt");
TextW.WriteDateTime(DateTime.Now);
End If;
End Sub Main;
After executing the example the current date and time converted into a text format are written into the end of the 1.txt file.
See also: