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

# XPersistentLocalStorageGetSpaceInfo

> XPersistentLocalStorageGetSpaceInfo

Returns an [XPersistentLocalStorageSpaceInfo](https://docs.xbox.com/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md) struct with storage space details, such as
space available.

## Syntax

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

### Parameters

*info*   \_Out\_\
Type: [XPersistentLocalStorageSpaceInfo\*](https://docs.xbox.com/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md)

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

### 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](https://docs.xbox.com/reference/errorcodes.md).

## 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](https://docs.xbox.com/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md) 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](https://docs.xbox.com/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo.md) 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.)

## Requirements

**Header:** XPersistentLocalStorage.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Local storage on XBOX console](https://docs.xbox.com/build/console-features/storage/local-storage.md)

## See also

[XPersistentLocalStorage](https://docs.xbox.com/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members.md)\
[XPersistentLocalStorageSpaceInfo](https://docs.xbox.com/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md)


## Related topics

- [XPersistentLocalStorageSpaceInfo](https://docs.xbox.com/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md)
- [XPersistentLocalStoragePromptUserForSpaceResult](https://docs.xbox.com/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceresult.md)
- [XPersistentLocalStoragePromptUserForSpaceAsync](https://docs.xbox.com/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync.md)
- [XPersistentLocalStorage (API contents)](https://docs.xbox.com/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members.md)
- [Local storage on Xbox console](https://docs.xbox.com/build/console-features/storage/local-storage.md)
