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

# WdCopyOptions

> WdCopyOptions

# WdCopyOptions

指定复制操作的方向和公共根别名。

## 语法

```cpp theme={null}
struct WdCopyOptions
{
    WdCopyDirection copyDirection;
    const char* commonRootAlias;
};
```

### 成员

`copyDirection`\
类型：**[WdCopyDirection](/reference/remoting/enums/wdcopydirection)**

复制操作的方向。使用 `CopyTo` 将文件从本地 PC 推送到远程设备，或使用 `CopyFrom` 将文件从远程设备拉取到本地 PC。如果未指定，则默认值为 `WdCopyDirection::CopyTo`。

`commonRootAlias`\
类型：**const char\***

远程设备上公共根目录的可选别名（UTF-8）。如果 `destinationPath` 是绝对路径，则会忽略 `commonRootAlias`。

## 备注

将此结构体传递给 [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) 以控制复制行为。如果为 `WdRemoteCopy` 的 `copyOptions` 参数传入 `nullptr`，则复制方向默认为 `CopyTo`，并且当目标路径是相对路径时使用默认公共根位置。

公共根允许用户使用预配置的已知位置来复制或启动游戏，并通过别名而非完整路径来引用它们。

## 要求

| 要求          | 值                   |
| ----------- | ------------------- |
| **头文件**     | WdRemoteIteration.h |
| **库**       | wdremoteapi.lib     |
| **支持的操作系统** | Windows 11 及更高版本    |
| **支持的体系结构** | x64、ARM64           |

## 另请参阅

* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [WdCopyDirection](/reference/remoting/enums/wdcopydirection)
* [XBOX PC 远程迭代 API](/reference/remoting/remoteiteration_members)
