Written by Christian Ahmer | 11/08/2023

Hierarchical File System (HFS), also known as Mac OS Standard, was developed by Apple Inc. to serve as the primary file system for Macintosh computers. Introduced in 1985 with the System 2.1 release, HFS was a significant improvement over its predecessor, the Macintosh File System (MFS), which was suitable for floppy disks but not for the larger capacity of hard drives.

HFS introduced a number of advanced features for its time. It utilized a hierarchical directory structure, which allowed for a more organized arrangement of files and directories. This was a departure from the flat directory structure used by MFS and allowed for faster access to files as the volume of data grew. HFS used a catalog file, which was a B-tree database that stored all the file and directory records in one place, making file access quicker and more efficient.

The allocation of disk space in HFS was managed by a volume bitmap, which tracked used and free space on the volume, and files were stored in blocks. The file system suffered from a limitation known as "fragmentation," which occurred when files were spread out in non-contiguous blocks across the disk, leading to slower file access times.

HFS Plus (HFS+), also known as Mac OS Extended, was introduced in 1998 with the release of Mac OS 8.1. HFS+ was designed to address the inefficiencies and limitations of HFS, especially to support larger file sizes and disks. It increased the block allocation size, which reduced the amount of space wasted when storing small files (a problem known as "slackspace"). HFS+ also increased the maximum number of allocation blocks on a disk, allowing for the support of larger volumes.

HFS+ introduced several other improvements over its predecessor:
- The use of Unicode for naming files and folders, which provided better international language support.
- The introduction of hard links, soft links (symbolic links), and journaling, which helped improve the reliability and integrity of the filesystem.
- Support for file attributes, which allowed metadata to be associated with files.
- The implementation of a journaling feature, which logged changes to the file system in a journal to quickly recover from crashes or power failures.

Journaling in HFS+ was an optional feature initially but became a standard in later versions of Mac OS. It provided a mechanism for protecting the integrity of the file system structure and reduced the need for disk repair utilities.

HFS+ continued to be the default file system for Mac OS until it was succeeded by the Apple File System (APFS) in 2017. APFS was built with modern storage technologies in mind, including solid-state drives (SSDs) and features like encryption, snapshot support, and space sharing.

Despite its eventual replacement by APFS, HFS+ remains in use, especially for older Macintosh computers and external drives intended for use with Macs. It is supported by macOS for both reading and writing, although Apple recommends APFS for SSDs and newer drives for better performance and reliability.

The legacy of HFS and HFS+ is significant as they provided the backbone for file storage in the Macintosh ecosystem for over three decades, adapting and evolving as the computing environment moved from floppy disks to high-capacity hard drives and SSDs. Their design reflected the balance between the technological limitations of their time and the drive for innovation that has characterized Apple's approach to system software.