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

> IDStorageFileX::Close

# IDStorageFileX::Close

ファイルを閉じます。

## 構文

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

### パラメーター

このメソッドにパラメーターはありません。

### 戻り値

Type: void

## 解説

このメソッドは、一致する `IDStorageFileX` オブジェクトの参照カウントに関係なく、ファイルを明示的に閉じます。

一致する `IDStorageFileX` オブジェクトへの最後の参照が解放されたとき、ファイルは暗黙的に閉じられます。

明示的または暗黙的にファイルを閉じる場合、未処理のすべての I/O 操作が完了するまでブロックされます。

`IDStorageFileX` オブジェクトが閉じられた後は、DirectStorage リクエストで使用できなくなります。

詳細については、[DirectStorage の概要](https://docs.xbox.com/ja-jp/build/console-features/storage/directstorage/directstorage-overview.md) の「IDStorageFileX」セクションを参照してください。

## 要件

**ヘッダー:** dstorage\_xs.h

**ライブラリ:** dstorage\_xs.lib

**サポートされているプラットフォーム:** XBOX Series 本体

## 関連項目

[IDStorageFactoryX::OpenFile](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)\
[IDStorageFileX](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)


## Related topics

- [IDStorageFileX (インターフェイスの内容)](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)
- [OpenFile](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)
- [DirectStorage の概要](https://docs.xbox.com/ja-jp/build/console-features/storage/directstorage/directstorage-overview.md)
- [GetHandle](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_gethandle.md)
- [IDStorageQueueX::Close](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_close.md)
