array ReadData(string filename, int count)
Returns array of bytes that represents the content of the
file. If the file does not exist or read operation failed the size
of result array is 0.
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 byte
array. 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")
array data = ReadData(sFileName, -1)
foreach(byte b in data)