ES3.LoadRawBytes
public static byte[] LoadRawBytes(string filePath, ES3Settings settings)
Description
Loads an entire file as a raw array of bytes.
A KeyNotFoundException or FileNotFoundException will be thrown if the file does not exist. In this case, you can use ES3.FileExists to check if the data exists before loading.
Parameters
[table th=”0″]filePath,”The relative or absolute path of the file we want to load the raw bytes from.”
settings,”[Optional] The settings we want to use to override the default settings.”[/table]
Returns
The loaded file as an array of bytes.
Examples
C#
// Load the file myFile.es3 as a byte array. byte[] bytes = ES3.LoadRawBytes("myFile.es3");
JS
// Load the file myFile.es3 as a byte array. var bytes : byte[] = ES3.LoadRawBytes("myFile.es3");