Class FileSaveLoader
- Namespace
- Aarthificial.Safekeeper.Loaders
- Assembly
- Aarthificial.Safekeeper.dll
Stores saves in the persistent data path.
public class FileSaveLoader : ISaveLoader
- Inheritance
-
FileSaveLoader
- Implements
- Inherited Members
Remarks
The saves are stored locally in a saves
directory located in the
persistent data path.
Constructors
FileSaveLoader(string)
public FileSaveLoader(string fileName)
Parameters
fileName
string
Methods
Create()
Create the save data for this save.
public Task<ISaveData> Create()
Returns
Remarks
This method is used if the save does not exist yet. It should not save the data to the persistent storage, only create it. This data will later be passed to Save(ISaveData).
Delete()
Remove this save from the persistent storage.
public Task Delete()
Returns
Exists()
Check if the save has already been created.
public Task<bool> Exists()
Returns
GetName()
Get the name of this save.
public Task<string> GetName()
Returns
Remarks
Used exclusively for debugging purposes.
Load()
Load the data from the persistent storage.
public Task<ISaveData> Load()
Returns
Save(ISaveData)
Save the data to the persistent storage.
public Task Save(ISaveData data)
Parameters
data
ISaveDataThe data to save.