---
title: "load(contentsOf:withName:configuration:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/audiofileresource/load(contentsof:withname:configuration:)"
---

# load(contentsOf:withName:configuration:)

Loads an AudioFileResource synchronously.

## Declaration

```swift
@MainActor @preconcurrency static func load(contentsOf url: URL, withName name: String? = nil, configuration: AudioFileResource.Configuration = .init()) throws -> AudioFileResource
```

## Discussion

Discussion important: The name provided must be unique.
