---
title: NSFileHandleDataAvailable
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsnotification/name-swift.struct/nsfilehandledataavailable
---

# NSFileHandleDataAvailable

Posted when the file handle determines that data is currently available for reading in a file or at a communications channel.

## Declaration

```swift
static let NSFileHandleDataAvailable: NSNotification.Name
```

## Discussion

Discussion The observers can then issue the appropriate messages to begin reading the data. To cause the posting of this notification, you must send either waitForDataInBackgroundAndNotify() or waitForDataInBackgroundAndNotify(forModes:) to an appropriate NSFileHandle object. The notification object is the NSFileHandle object that sent the notification. This notification doesn’t contain a userInfo dictionary.

## See Also

### Working with notifications

- [NSFileHandleConnectionAccepted](foundation/nsnotification/name-swift.struct/nsfilehandleconnectionaccepted.md)
- [readCompletionNotification](foundation/filehandle/readcompletionnotification.md)
- [NSFileHandleReadToEndOfFileCompletion](foundation/nsnotification/name-swift.struct/nsfilehandlereadtoendoffilecompletion.md)
