A message a file handle sends when it reads all data in a file, or another process in a communication channel signals the end of the data.
Before adding an observer for this message type, call either ``FileHandle/readToEndOfFileInBackgroundAndNotify()`` or ``FileHandle/readToEndOfFileInBackgroundAndNotify(forModes:)`` on an appropriate ``FileHandle`` object.
Observe this message with the identifier ``NotificationCenter/MessageIdentifier/readToEndOfFileCompletion``, or specify its type directly to the `addObserver(of:for:using:)` method.
The ``NotificationCenter/MainActorMessage/Subject`` of this message type is ``FileHandle``.
This message interoperates with the notification ``NSNotification/Name/NSFileHandleReadToEndOfFileCompletion``.
The system notifies observers of the message when the ``NotificationCenter`` posts the notification.
Similarly, the system notifies observers of the notification when it posts the message.
Converts a posted notification into this asynchronous message type for any observers.
To implement this method in your own `AsyncMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message.
- Parameter notification: The posted ``Notification``.
- Returns: The converted `AsyncMessage`, or `nil` if conversion is not possible.
Converts a posted asynchronous message into a notification for any observers.
To implement this method in your own `AsyncMessage` conformance, use the properties defined by the message to populate the ``Notification``'s ``Notification/userInfo``.
- Parameters:
- message: The posted `AsyncMessage`.
- Returns: The converted ``Notification``.
get · iOS 26.0+
name
TypeScript
static get nameValue(): NSNotification_Name
Swift declaration
static var name: Notification.Name { get }
A optional name corresponding to this type, used to interoperate with notification posters and observers.
Creates a message that indicates a file handle reached the end of a file or the data.
- Parameter dataItem: A result instance that contains either the data read in or an error.
get · iOS 26.0+
dataItem
TypeScript
get dataItem(): SDKHandle
Swift declaration
var dataItem: Result<Data, POSIXError>
A result that contains either the data read or an error.
set · iOS 26.0+
dataItem
TypeScript
set dataItem(value: SDKHandle)
Swift declaration
var dataItem: Result<Data, POSIXError>
A result that contains either the data read or an error.