---
title: "init(dataItem:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/filehandle/readtoendoffilecompletionmessage/init(dataitem:)"
---

# init(dataItem:)

Creates a message that indicates a file handle reached the end of a file or the data.

## Declaration

```swift
init(dataItem: Result<Data, POSIXError>)
```

## Parameters

- `dataItem`: A result instance that contains either the data read in or an error.
