> ## 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::Close

> IDStorageFileX::Close

# IDStorageFileX::Close

Closes the file.

## Syntax

```cpp theme={null}
void Close(  
)  
```

### Parameters

This method has no parameters.

### Return value

Type: void

## Remarks

This method explicitly closes the file, regardless of the reference count on the matching `IDStorageFileX` object.

A file is implicitly closed when the last reference to the matching `IDStorageFileX` object is released.

Closing a file explicitly or implicitly will block until all outstanding I/O operations are complete.

After an `IDStorageFileX` object is closed, it can no longer be used in DirectStorage requests.

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

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage\_xs.lib

**Supported platforms:** XBOX Series consoles

## See also

[IDStorageFactoryX::OpenFile](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile)\
[IDStorageFileX](/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex)


## Related topics

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