The write file activity can be used to write or append data to a file
uses System.IOUtils.TFile.WriteAllText and System.IOUtils.TFile.AppendAllText
uses System.Classes.TStrings.SaveToFile
Activity properties
begin BinaryValue.Stream.Position := 0; BinaryValue.Stream.SaveToFile(FileName); end; |
Resulting code
If there is no existing file at the given file path, a new file will be created.
It's possible to provide a binary or string value.
When using a string value, the option 'Append content' is also available. This determines if the string should be added at the end of the file, or if the existing file should be overridden.