Chapter 16
Working with Files
Most applications will need to deal with files stored on disk in one way or another. So far in this book, we really haven’t dealt much with this topic (except for a bit of discussion about Core Data and its data stores), so let’s remedy that right now. Cocoa actually includes several useful classes for dealing with files in a number of ways. There are classes that provide APIs mimicking operations the user can normally do in the Finder and others that represent a file in an abstract way. Still other classes have built-in functionality for reading and writing files. This chapter will provide an overview of how these mechanisms work.
Implicit File Access
Several classes in Cocoa, such as NSString, NSData, NSArray ...
Get Learn Cocoa on the Mac, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.