string ReadDataToString(string filename, int
Returns a string that represents the content of the file.
If the file does not exist or read operation failed the result
string is empty.
filename – the
name of the file.
count - the maximum number of bytes to be read from
the file or -1 to read all bytes.
Call this function to read data from the file into a
string. Note that calling this
function repositions the read pointer in the file by the number of
bytes that have been read. In order to shift the read pointer to
the beginning of the file you need to close the file first using
Plug in module:
The following example demonstrates the use of
string sFileName = "C:\MyFiles\Data.txt"
Println("File ", sFileName, " does not exist")
string sResult = ReadDataToString(sFileName, -1)