> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameSaveContainerInfo

> XGameSaveContainerInfo

# XGameSaveContainerInfo

关于 XGameSaveContainer 的信息。

## 语法

```cpp theme={null}
typedef struct XGameSaveContainerInfo {  
    const char* name;  
    const char* displayName;  
    uint32_t blobCount;  
    uint64_t totalSize;  
    time_t lastModifiedTime;  
    bool needsSync;  
} XGameSaveContainerInfo  
```

### 成员

*name*\
类型：const char\*

XGameSaveContainer 的名称。

*displayName*\
类型：const char\*

XGameSaveContainer 的显示名称。

*blobCount*\
类型：uint32\_t

XGameSaveContainer 中的 Blob 数量。

*totalSize*\
类型：uint64\_t

XGameSaveContainer 的总大小。

*lastModifiedTime*\
类型：time\_t

上次更新 XGameSaveContainer 的时间。

*needsSync*\
类型：bool

一个布尔值，指示本地与服务器端游戏保存数据之间是否存在差异。

<Note>仅在你调用 XGameSaveInitializeProviderAsync 并将 syncOnDemand 设置为 true 时，此值才会为 true。任何尝试读取或写入 needsSync 为 true 的容器数据都可能导致在游戏上显示同步 UX。</Note>

## 备注

此结构描述 **XGameSaveContainer**，简称为容器。容器包含一个或多个从游戏保存的数据，这些数据具有某种共同的主题或用途。它相当于文件存储系统中的文件夹。容器由包含单个数据的 [XGameSaveBlob](/reference/system/xgamesave/structs/xgamesaveblob) 对象填充。GameSave API 在容器级别提供原子更新，因此对其应用的任何操作要么完全成功要么完全不进行。如果你尝试更改容器内的多个 Blob，而其中一个 Blob 更新失败，则容器中的每个 Blob 在操作结束时都将保持不变。你可以使用 [XGameSaveEnumerateContainerInfo](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfo) 或 [XGameSaveEnumerateContainerInfoByName](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfobyname) 函数查找游戏的容器。**XGameSaveContainerInfo** 是 [XGameSaveContainerInfoCallback](/reference/system/xgamesave/functions/xgamesavecontainerinfocallback) 的参数。

## 要求

**标头：** XGameSave.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameSave](/reference/system/xgamesave/xgamesave_members)\
[XGameSaveEnumerateContainerInfo](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfo)\
[XGameSaveEnumerateContainerInfoByName](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfobyname)\
[XGameSaveContainerInfoCallback](/reference/system/xgamesave/functions/xgamesavecontainerinfocallback)


## Related topics

- [XGameSaveContainerInfoCallback](/zh-CN/reference/system/xgamesave/functions/xgamesavecontainerinfocallback.md)
- [XGameSaveEnumerateContainerInfo](/zh-CN/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfo.md)
- [XGameSaveGetContainerInfo](/zh-CN/reference/system/xgamesave/functions/xgamesavegetcontainerinfo.md)
- [XGameSaveEnumerateContainerInfoByName](/zh-CN/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfobyname.md)
- [XGameSaveCreateContainer](/zh-CN/reference/system/xgamesave/functions/xgamesavecreatecontainer.md)
