Skip to content

Flow documentation · legacy product

LoadFileToString ​

Declaration ​

Function LoadFileToString( const aFileName : string) : string

Function LoadFileToWideString( const aFileName : string) : widestring

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
var data : string;
begin
  data := LoadFileToString('c:\test.txt'); // reads file into string
LogInfo('First five characters from file: ' + Copy(data, 1, 5));
end;

Description ​

Loads the contents of file aFileName into a string. Also see SaveToFile.

Use the WideString version to handle Unicode characters.