---
title: "updateContents(url:)"
framework: spatialpreview
role: symbol
role_heading: Instance Method
path: "spatialpreview/documentpreviewsession/updatecontents(url:)"
---

# updateContents(url:)

Update the contents of the document with the provided URL.

## Declaration

```swift
final nonisolated(nonsending) func updateContents(url: URL) async throws
```

## Parameters

- `url`: A file URL pointing to the new document contents.
