Retired Document
Important: This document is replaced by File System Programming Guide.
File System Comparisons
There are many significant differences between the two major file systems on Mac OS X: HFS+ and UFS. In many cases, these differences have some bearing on programs developed for Mac OS X. The following list summarizes the major differences between these file systems (many of these statements apply to HFS as well as HFS+):
Case sensitivity. UFS is sensitive to case; although HFS+ is case-insensitive, it is case-preserving.
Multiple forks. HFS+ supports multiple forks (and additional metadata) whereas UFS supports only a single fork. (Carbon simulates multiple forks on file systems that do not support them, such as UFS.)
Path separators. HFS+ uses colons as path separators whereas UFS follows the convention of forward slashes. The system translates between these separators.
Modification dates. HFS+ supports both creation and modification dates as file metadata; UFS supports modification dates but not creation dates. If you copy a file with a command that understands modification dates but not creation dates, the command might reset the modification date as it creates a new file for the copy. Because of this behavior, it is possible to have a file with a creation date later than its modification date.
Sparse files and zero filling. UFS supports sparse files, which are a way for the file system to store the data in files without storing unused space allocated for those files. HFS+ does not support sparse files and, in fact, zero-fills all bytes allocated for a file until end-of-file.
Lightweight references to file-system items. See Aliases and Symbolic Links.
In addition, the interfaces historically associated with each file system sometimes have different behaviors. For example, a program using BSD (or BSD-derived) interfaces can delete a file that is open; on the other hand, a Carbon program can delete only a file that is closed.
Table 1 provides a comparative summary of features in the UFS and HFS+ file systems.
Copyright © 2003, 2011 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2011-05-25