ES3.SaveRaw
Save Raw Bytes
Description
Saves a byte array as a file, overwriting any existing files.
Parameters
bytes | The bytes we want to save as a file. |
filePath |
[Optional] The relative or absolute path of the file we want to store our value to. |
settings |
[Optional] The settings we want to use to override the default settings. |
Examples
C#
1 2 |
// Saves a byte array as a file. ES3.SaveRaw(byteArray, "myFile.txt"); |
JS
1 2 |
// Saves a byte array as a file. ES3.SaveRaw(byteArray, "myFile.txt"); |
Save Raw String
Description
Saves a string as a file, overwriting any existing files.
It will use the text encoding in the default settings to determine the encoding to use to store the string unless you provide a different encoding in an ES3Settings object provided as a parameter.
Because an encoding is applied, the string will be readable and editable in a text editor.
Parameters
str | The string we want to save as a file. |
filePath |
[Optional] The relative or absolute path of the file we want to store our value to. |
settings |
[Optional] The settings we want to use to override the default settings. |
Examples
C#
1 2 3 4 |
// Create a string which we want to store as a file. string str = "Line 1 \nLine2 \nLine3"; // Saves the string as a file. ES3.SaveRaw(str, "myFile.txt"); |
JS
1 2 3 4 |
// Create a string which we want to store as a file. var str : string = "Line 1 \nLine2 \nLine3"; // Saves the string as a file. ES3.SaveRaw(str, "myFile.txt"); |