PlatformAPI reference
Interface IStorage
Namespace: MicroEngine.Platform
Assembly: MicroEngine.Platform.dll
Guide: The platform host
Where a game keeps what it saves: named slots of text that are written whole (files on desktops and phones, the
page’s localStorage in browsers, a cloud service). Failures surface as IOException or
UnauthorizedAccessException.
public interface IStorageProperties
Location
The save folder, or a description of the medium for diagnostics.
string Location { get; }Property Value
Methods
Delete(string)
Removes the slot; does nothing when it does not exist.
void Delete(string slot)Parameters
slot string
Exists(string)
Whether the slot has data.
bool Exists(string slot)Parameters
slot string
Returns
Read(string)
The slot’s text, or null when it does not exist.
string? Read(string slot)Parameters
slot string
Returns
SetAside(string)
Moves unreadable data out of the slot, keeping a copy; best effort, never throws.
void SetAside(string slot)Parameters
slot string
Write(string, string)
Replaces the slot atomically.
void Write(string slot, string text)Parameters
slot string
text string