Inside The File System

Figure 12.1 shows that the physical disk is divided up into partitions:

Figure 12.1  Partitions

Partitions

Figure 12.2 shows an idealized Unix file system on a particular partition. HFS+ is actually implemented differently, but this mental model will help you understand the upcoming system calls.

Figure 12.2  Filesystem

Filesystem

The superblock is a block in a known location that has pointers to the rest of the on-disk data structures. Frequently there are redundant copies of the superblock in case the primary superblock gets destroyed.

An inode, ...

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.