<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INFile/init(data:filename:typeIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INFile(cm)fileWithData:filename:typeIdentifier:"
  },
  "title" : "init(data:filename:typeIdentifier:)"
}
-->

# init(data:filename:typeIdentifier:)

Creates a new file object with the specified data and identifier.

```
init(data: Data, filename: String, typeIdentifier: String?)
```

## Parameters

`data`

The data associated with the file.

`filename`

The name of the file.

`typeIdentifier`

The type associated with the file.

## Return Value

A new [`INFile`](/documentation/Intents/INFile) object containing the supplied information.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)