Show / Hide Table of Contents

    Meta Data

    The meta data API allows you to store additional information with storage items, this allows for extra functionalities such as holding a list of backups, last modification time, last access time, whether the file is encrypted or no, ...

    Loading the Meta Data

    You can load the meta data using IStorage.LoadMetaData or SaveSystemAPI.LoadMetaDataAsync method:

    StorageMetaData metaData = await SaveSystemAPI.LoadMetaDataAsync("my-identifier");
    

    Modifying the Meta Data

    StorageMetaData metaData = await SaveSystemAPI.LoadMetaDataAsync("my-identifier");
    
    // Add a new custom meta data
    metaData["Corrupted"] = true;
    
    // Or modify existing meta data
    metaData["Encrypted"] = false;
    
    // Save the modified meta data
    await SaveSystemAPI.SaveMetaDataAsync("my-identifier", metaData);
    

    Disabling the Meta Data

    You can disable the meta data feature by disabling the Use Meta Data in a Settings preset:

    Default Settings

    Default Settings Window

    Or using the Settings window or by setting the UseMetaData property of SaveSystemSettings class:

    SaveSystemSettings settings = SaveSystemSettings.DefaultSettings.Clone();
    settings.UseMetaData = false;
    

    Or disable it from default settings:

    SaveSystemSettings settings = SaveSystemSettings.DefaultSettings;
    settings.UseMetaData = false;
    
    • Improve this Doc
    • 0 Comments