<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileHandle/ReadCompletionMessage/init(dataItem:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So12NSFileHandleC10FoundationE21ReadCompletionMessageV8dataItemAEs6ResultOyAC4DataVAC10POSIXErrorVG_tcfc"
  },
  "title" : "init(dataItem:)"
}
-->

# init(dataItem:)

Creates a message that indicates a file handle read data.

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

## Parameters

`dataItem`

A result instance that contains either the data read or an error.

---

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)