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

# IXtfFileIOClient::CreateDirectory Method

> IXtfFileIOClient::CreateDirectory Method

# IXtfFileIOClient::CreateDirectory Method

在开发主机上创建指定的目录。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
public:
HRESULT CreateDirectory(
         LPCWSTR pszDirectory
)  
```

<a id="parametersSection" />

### 参数

*pszDirectory*\
类型：LPCWSTR

指向要在开发主机上创建的目录的目录路径的指针。

<a id="retvalSection" />

### 返回值

类型：HRESULT

如果成功，则返回 `S_OK`；否则返回 HRESULT 错误代码。

<a id="remarksSection" />

## 备注

此函数在开发主机上创建目录。如果发生错误，此函数将返回 HRESULT 错误代码。有关特定于 XBOX 工具框架 (XTF) API 的 HRESULT 错误代码的详细信息，请参阅 [XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)。

使用 [IXtfFileIOClient::RemoveDirectory](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/removedirectory-ixtffileioclient-xtffileio-xbox-microsoft-m) 方法移除开发主机上的目录。

<a id="requirementsSection" />

## 要求

**头文件：** xtffileio.h

**库：** xtffileio.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

<a id="seealsoSection" />

## 另请参阅

[IXtfFileIOClient Interface](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/ixtffileioclient-xtffileio-xbox-microsoft-t)\
[XtfFileIO](/reference/tools/xtf/xtffileio/xtffileio-xbox-microsoft-n)


## Related topics

- [IXtfFileIOClient::RemoveDirectory Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/removedirectory-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::CopyFiles Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::DeleteFiles Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/deletefiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::FindFiles Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/findfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::GetFileInfo Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileinfo-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
