HFS Directory Structure Checking:
---------------------------------
* Volume checks
- Every block allocated to a file on a volume is marked in the volume bitmap.
- Every block not allocated to a file on a volume is not marked in the volume
bitmap.
- Every file on the volume has a unique set of blocks. No file claims blocks
that are allocated to another file.
* Directory checks
- Each directory has the same number of files and directories allocated
to it that is claimed in the directory record.
- The number of directories on the volume is the same as the number of
directories found in the volume header.
* BTree checks
- Each node in the catalog and extent trees has the proper valence.
- Each node in the catalog and extent trees is properly marked in the volume
bitmap.
- Each node in the catalog and extent trees is referenced only once.
Resource File Checks:
---------------------
The Resource File Check performs an analysis of the System files, testing for
the following:
* The resource fork is at least the minimum size.
* There is no overlap or space between the header, the resource data list,
and the resource map.
* There are no bytes between the End Of File (EOF) and the end of the resource
map.
* Each record in the resource data list is used once and only once. The last
data item ends exactly where the data list ends.
* Each item in the resource type list contains at least one reference; each
sequence of referenced items starts where the previous resource type item's
reference list ended; and each item in the reference list is pointed to by
one and only one resource type list item.
* There are no duplicates in the resource type list.
* Each name in the name list has one and only one reference, and the last name
doesn't point outside the name list.
* Each reference list item points to a valid data item and either has a name
list offset of ð1 or points to a valid name list offset.
* All names have a non-zero length.