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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.