From Clomosy Docs
procedure ReWrite(var FileHandle TextFile);
Opening the file in write mode erases its content and prepares it to write new data.
The file created with AssignFile is opened with ReWrite using the file name specified in the directory where the Clomosy Learn application is located.
If the created file is already in the directory, an error will occur when calling `ReWrite`. Before using `ReWrite`, it should be checked whether the file exists.
While the `ReWrite` procedure erases the data in the created file and writes new data over it, the `Append` procedure does not delete the file content and continues to add data to the end of the file.
Example
var
file1 : TextFile;
{
AssignFile(file1, 'Test.txt');
ReWrite(file1);
}