ES3File Class

Represents a file in memory which can by synced with a file in storage.

Because the ES3File keeps the file in memory and only commits changes to storage when the Sync method is called, it provides improved performance over the ES3.Save and ES3.Load methods which store data immediately to storage.

ES3File Constructor Creates an ES3File.
ES3File.Save Saves a value to the ES3File.
ES3File.Load Loads a value from the ES3File.
ES3File.LoadInto Loads a value from an ES3File into an existing object.
ES3File.Sync Synchronises the data in this ES3File with the file in storage.
ES3File.LoadRawBytes Loads the contents of the ES3File as a byte array.
ES3File.LoadRawString Loads the contents of the ES3File as a string.
ES3File.DeleteKey Deletes a key from the ES3File.
ES3File.KeyExists Checks whether a key exists in the ES3File.
ES3File.Clear Removes the data stored in this ES3File. The ES3File will be empty after calling this method.
ES3File.GetKeys Returns an array of all of the key names in this ES3File.
ES3File.Size Returns the size of the data stored in this ES3File in bytes.

Examples

C#

JS