---
title: "init(contentsOf:contentType:openInPlace:coordinated:visibility:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsitemprovider/init(contentsof:contenttype:openinplace:coordinated:visibility:)"
---

# init(contentsOf:contentType:openInPlace:coordinated:visibility:)

Provides data-backed content from an existing file with the specified parameters.

## Declaration

```swift
convenience init(contentsOf fileURL: URL, contentType: UTType?, openInPlace: Bool = false, coordinated: Bool = false, visibility: NSItemProviderRepresentationVisibility = .all)
```

## Parameters

- `fileURL`: The URL of the file to use for the item provider’s data.
- `contentType`: The content type of the specified file.
- `openInPlace`: true if the system opens the file in place.
- `coordinated`: true if the returned file must be accessed using doc://com.apple.foundation/documentation/Foundation/NSFileCoordinator.
- `visibility`: The doc://com.apple.foundation/documentation/Foundation/NSItemProviderRepresentationVisibility setting the system uses to identify which processes can see this content.

## Discussion

Discussion If openInPlace is set to false, the system copies the file provided before the load handler returns.

## See Also

### Creating an item provider

- [init(contentsOf:)](foundation/nsitemprovider/init(contentsof:).md)
- [init(item:typeIdentifier:)](foundation/nsitemprovider/init(item:typeidentifier:).md)
- [init()](foundation/nsitemprovider/init().md)
- [init(object:)](foundation/nsitemprovider/init(object:).md)
