> ## 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.

# XPersistentLocalStorageSpaceInfo

> XPersistentLocalStorageSpaceInfo

# XPersistentLocalStorageSpaceInfo

包含有关永久本地存储 (PLS) 状态的详细信息，由 [XPersistentLocalStorageGetSpaceInfo](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo) 返回。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
typedef struct XPersistentLocalStorageSpaceInfo {
    uint64_t availableFreeBytes;
    uint64_t totalFreeBytes;
    uint64_t usedBytes;
    uint64_t totalBytes;
} XPersistentLocalStorageSpaceInfo
```

<a id="membersSection" />

### 成员

*availableFreeBytes*\
类型：uint64\_t

可用存储空间量（以字节为单位）。

*totalFreeBytes*\
类型：uint64\_t

PLS 分配后剩余的空间量。你可能需要提示用户释放空间以使这些字节可用。有关详细信息，请参阅 [XPersistentLocalStoragePromptUserForSpaceAsync](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync)。

*usedBytes*\
类型：uint64\_t

当前正在使用的存储空间量（以字节为单位）。

*totalBytes*\
类型：uint64\_t

用户可以使用的总存储空间量（以字节为单位）。

<a id="remarksSection" />

## 备注

如果你的游戏使用可扩展永久本地存储，则可调用 [XPersistentLocalStorageGetSpaceInfo](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo) 函数来确定有多少可用存储空间。

当 `XPersistentLocalStorageGetSpaceInfo` 函数调用返回时，检查 [XPersistentLocalStorageSpaceInfo](/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo) 对象以获取存储详细信息。

存储详细信息包括已使用的空间量、游戏可用的空间量以及是否应提示用户释放空间。

<a id="requirementsSection" />

## 要求

**头文件：** XPersistentLocalStorage.h

**库：** xgameruntime.lib

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

<a id="seealsoSection" />

## 另请参阅

[XPersistentLocalStorage](/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members)\
[XPersistentLocalStorageGetSpaceInfo](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo)\
[XPersistentLocalStoragePromptUserForSpaceAsync](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync).


## Related topics

- [XPersistentLocalStorageGetSpaceInfo](/zh-CN/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo.md)
- [XPersistentLocalStorage](/zh-CN/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members.md)
- [XPersistentLocalStoragePromptUserForSpaceResult](/zh-CN/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceresult.md)
- [XPersistentLocalStoragePromptUserForSpaceAsync](/zh-CN/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync.md)
- [XPersistentLocalStorageGetPath](/zh-CN/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetpath.md)
