Back to index

QuickSaveWriter

Create

The specified root is immediately opened and cached. Do not create multiple QuickSaveWriter's on the same root as they'll overwrite each others changes

A QuickSaveException is raised if the root fails to open or load

Creates a new QuickSaveWriter, data can be encrypted and or compressed by specifying a QuickSaveSettings object

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

Write

Writes are not saved to the underlying file until Commit is called

Writes an object to the specified key

C#
quickSaveWriter.Write<TypeToWrite>("KeyName", objectToWrite);

Delete

Deletes are not saved to the underlying file until Commit is called

Deletes the specified key if it exists

C#
quickSaveWriter.Delete("KeyName");

DeleteRoot

Deletes the specified root if it exists

C#
QuickSaveWriter.DeleteRoot("RootName");

RootExists

Determines if the specified root exists

C#
QuickSaveWriter.RootExists("RootName");

KeyExists

Determines if the specified key exists

C#
quickSaveWriter.Exists("KeyName");

GetAllKeys

Gets the names of all the keys under this root

C#
quickSaveWriter.GetAllKeys();

Commit

A QuickSaveException is raised if the commit fails

Commits the changes to file

C#
quickSaveWriter.Commit();

TryCommit

Attempts to commit the changes to file, returns a boolean value indicating whether the commit was successful

C#
quickSaveWriter.TryCommit();