Procedure SaveToFile( const aContents, aFileName : string)
Procedure SaveWideStringToFile( const aContents : widestring; const aFileName : string)
procedure OnMapEvent(var Value:Variant);
var data : string;
begin
data := 'abcde'
SaveToFile(data, 'c:\test.txt');
end;
Saves the string given by aContents as a file named aFileName. Also see LoadFileToString.
Use the WideString version to handle Unicode characters.
If a file with aFileName already exists then it will be overwritten if attributes and permissions allow (if not allowed then an Exception will be raised - see Exceptions).