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

# IDStorageFileX (Interface contents)

> IDStorageFileX

Represents a file to be accessed by DirectStorage.

## Syntax

```cpp theme={null}
class IDStorageFileX : public IUnknown  
```

## Methods

| Method | Description |
| - | - |
| [IDStorageFileX::Close](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close.md) | Closes the file. |
| [GetHandle](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_gethandle.md) | Gets a Win32 handle to the file represented by the object. |

## Remarks

To create an object that implements the `IDStorageFileX` interface, call the [IDStorageFactoryX::OpenFile](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md) method. This is analogous to using `CreateFile` in the Win32 API interfaces.

For more information, see the "API overview" section in [DirectStorage Overview](https://docs.xbox.com/build/console-features/storage/directstorage/directstorage-overview.md).

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage.lib

**Supported platforms:** XBOX Series consoles

## See also

[IDStorageFactoryX::OpenFile](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)\
[DStorage](https://docs.xbox.com/reference/system/dstorage/dstorage_members.md)


## Related topics

- [IDStorageFileX::Close](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close.md)
- [DirectStorage Overview](https://docs.xbox.com/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFactoryX (Interface contents)](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx.md)
- [IDStorageFactoryX1 (Interface contents)](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFactoryX1/idstoragefactoryx1.md)
- [IDStorageFactoryX2 (Interface contents)](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageFactoryX2/idstoragefactoryx2.md)
