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

# XPersistentLocalStorageGetSpaceInfo

> XPersistentLocalStorageGetSpaceInfo

# XPersistentLocalStorageGetSpaceInfo

Returns an [XPersistentLocalStorageSpaceInfo](/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo) struct with storage space details, such as
space available.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XPersistentLocalStorageGetSpaceInfo(
         XPersistentLocalStorageSpaceInfo* info
)
```

<a id="parametersSection" />

### Parameters

*info*   \_Out\_\
Type: [XPersistentLocalStorageSpaceInfo\*](/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo)

The `XPersistentLocalStorageSpaceInfo` structure, used for storing storage space details.

<a id="retvalSection" />

### Return value

Type: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

Returns **S\_OK** if successful; otherwise, returns an error code. For a list of error codes, see [Error Codes](/reference/errorcodes).

<a id="remarksSection" />

## Remarks

Use this function to determine how much storage space is available if your title uses Growable Persistent Local Storage (GPLS).

The storage details are contained in the [XPersistentLocalStorageSpaceInfo](/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo) structure.

Storage details include the amount of space in use, how much is available to the title, and whether the user should be prompted
to free up space.

Note that calling
[GetDiskFreeSpaceExW ](https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-getdiskfreespaceexw)
will only tell titles the maximum amount of free space left in PLS - this is not guaranteed to be
available.
[XPersistentLocalStorageGetSpaceInfo](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo) will also return the
total free space as well as the available free space (the minimum of what is free and the actual
space on the underlying drive.)

<a id="requirementsSection" />

## Requirements

**Header:** XPersistentLocalStorage.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## Conceptual documentation

* [Local storage on XBOX console](/build/console-features/storage/local-storage)

## See also

[XPersistentLocalStorage](/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members)\
[XPersistentLocalStorageSpaceInfo](/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo)


## Related topics

- [XPersistentLocalStorageSpaceInfo](/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md)
- [XPersistentLocalStorage](/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members.md)
- [XPersistentLocalStoragePromptUserForSpaceResult](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceresult.md)
- [XPersistentLocalStoragePromptUserForSpaceAsync](/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
