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 ...
Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide 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.