O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11Files, Part 1: I/O and Permissions

Files are the permanent storage for the data that your programs generate. The verbs of handling files are similar to most every other common platform: open, read, write, seek to a particular location, close, with some added nuances that live in the details.

The idea of a file is a fundamental Unix concept. Pretty much everything is treated as a file. Ordinary write the bits for a jpeg photo go to files in the file system. Network connections are treated as files. Manipulating some physical devices is done with file operations. Interacting with the terminal is done the same way. Many forms of interprocess communication happen through logical files. This is pretty nice, being able to use the same API for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required