---
title: "export(to:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdlayer/export(to:)-5hboj"
---

# export(to:)

Writes the layer’s contents to a file at the given path.

## Declaration

```swift
func export(to path: FilePath) throws
```

## Parameters

- `path`: The destination file path.

## Discussion

Discussion note: An error if the layer cannot be written.

## See Also

### Exporting and importing

- [export(to:)](usdkit/usdlayer/export(to:)-7vouy.md)
- [importContents(from:)](usdkit/usdlayer/importcontents(from:)-2ipug.md)
- [importContents(from:)](usdkit/usdlayer/importcontents(from:)-99hnf.md)
