ReadFileBytes Procedure

Reads the contents of a file as a list of bytes. Each byte in the file is a number from 0-255 in the list. Use WriteFileBytes to write a list of bytes to a file.
Declaration
function ReadFileBytes(filePath as String) as List of Number

Parameters

Return value

List of Number — The contents of the file, one element per byte.

Possible error codes

Example

Code
WriteFileText "myfile.dat", "ABC"
dim x = ReadFileBytes("myfile.dat")
print Len(x)
print x(0)
print x(1)
print x(2)
Output
3
65
66
67