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

# IDStorageFileX

> IDStorageFileX

# IDStorageFileX

Represents a file to be accessed by DirectStorage.

## Syntax

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

## Methods

| Method                                                                                                     | Description                                                |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [IDStorageFileX::Close](/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close) | Closes the file.                                           |
| [GetHandle](/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_gethandle)         | 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](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile) method. This is analogous to using `CreateFile` in the Win32 API interfaces.

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

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage.lib

**Supported platforms:** XBOX Series consoles

## See also

[IDStorageFactoryX::OpenFile](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFileX::Close](/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close.md)
- [IDStorageFileX::GetHandle](/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_gethandle.md)
- [IDStorageFactoryX::OpenFile](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)
- [DStorage](/reference/system/dstorage/dstorage_members.md)
