Type Property

NSFileHandleReadToEndOfFileCompletion

This notification is posted when the file handle reads all data in the file or, if a communications channel, until the other process signals the end of data.

Declaration

static let NSFileHandleReadToEndOfFileCompletion: NSNotification.Name

Discussion

It makes the data available to observers by putting it in the userInfo dictionary. To cause the posting of this notification, you must send either readToEndOfFileInBackgroundAndNotify() or readToEndOfFileInBackgroundAndNotify(forModes:) to an appropriate NSFileHandle object.

The notification object is the NSFileHandle object that sent the notification. The userInfo dictionary contains the following information:

Key

Value

NSFileHandleNotificationDataItem

An NSData object containing the available data read from a socket connection

@"NSFileHandleError"

An NSNumber object containing an integer representing the UNIX-type error which occurred