---
title: "importContents(from:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdlayer/importcontents(from:)-2ipug"
---

# importContents(from:)

Replaces the layer’s contents with the layer file at the given path.

## Declaration

```swift
func importContents(from path: FilePath) throws
```

## Parameters

- `path`: The path of the layer file to read.

## Discussion

Discussion note: An error if the file cannot be read or parsed.

## See Also

### Exporting and importing

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