---
title: "copy(from:to:in:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdlayer/copy(from:to:in:)"
---

# copy(from:to:in:)

Copies the spec at srcPath in this layer (and its children) to dstPath.

## Declaration

```swift
@discardableResult func copy(from srcPath: USDLayer.Path, to dstPath: USDLayer.Path, in dstLayer: USDLayer? = nil) -> Bool
```

## Parameters

- `srcPath`: The path of the source spec to copy.
- `dstPath`: The destination path.
- `dstLayer`: The destination layer. Pass nil to copy within this layer.

## Return Value

Return Value true on success.

## See Also

### Editing scene description

- [USDLayer.ListOperation](usdkit/usdlayer/listoperation.md)
- [USDLayer.ListOperationType](usdkit/usdlayer/listoperationtype.md)
- [USDLayer.Relocate](usdkit/usdlayer/relocate.md)
- [USDLayer.RelocatesMap](usdkit/usdlayer/relocatesmap.md)
- [USDLayer.ChangeList](usdkit/usdlayer/changelist.md)
