Back to index

QuickSaveReader

Create

The specified root is immediately opened and cached. If the root is written to after Create has been called you'll need to call Reload to see the changes

A QuickSaveException is raised if the root fails to open

Creates a new QuickSaveReader, data can be decrypted and or decompressed by specifying a QuickSaveSettings object

C#
QuickSaveReader.Create("RootName"); // Or QuickSaveReader.Create("RootName", settings);

Read

A QuickSaveException is raised if the read fails

Reads an object under the specified key

C#
quickSaveReader.Read<TypeToRead>("KeyName"); // Or quickSaveReader.Read<TypeToRead>("KeyName", (r) => { var objectToRead = r; });

TryRead

Attempts to read an object under the specified key, returns a boolean value indicating whether the read was successful

C#
quickSaveReader.TryRead<TypeToRead>("KeyName", out objectToRead);

Reload

Reloads data from the root - call this if the root has been written to by a QuickSaveWriter after the reader was created

C#
quickSaveReader.Reload();

DeleteRoot

Deletes the specified root if it exists

C#
QuickSaveWriter.DeleteRoot("RootName");

RootExists

Determines if the specified root exists

C#
QuickSaveReader.RootExists("RootName");

KeyExists

Determines if the specified key exists

C#
quickSaveReader.Exists("KeyName");

GetAllKeys

Gets the names of all the keys under this root

C#
quickSaveReader.GetAllKeys();