Friday, December 11, 2015 [Tweets] [Favorites]

NSFileHandle’s Indeterminable readabilityHandler

Sven (via Jeremy W. Sherman):

The problem is that I need to know when the last chunk of data was read. availableData should return an empty NSData instance if it reached end-of-file, but the problem is that the reachability handler is not called again on EOF.

I can’t find anything about how to get some kind of notification or callback on EOF. So what am I missing? Is Apple really providing an asynchronous reading API without an EOF callback?


Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment