---
title: "data(contentType:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/intentfile/data(contenttype:)"
---

# data(contentType:)

Requests an IntentFile representation as binary data of the requested content type if possible.

## Declaration

```swift
func data(contentType: UTType) async throws -> Data
```

## Parameters

- `contentType`: A content type of the returned data.

## Discussion

Discussion If the IntentFile is backed by a file URL, this might cause loading the entire file contents into memory.
