Important: The information in this document is obsolete and should not be used for new development.
Directory IDs
A directory ID is a unique number that the File Manager uses to distinguish one directory from another on the same volume. Assigned by the File Manager when the directory is created, a directory ID is simply the catalog node ID of a directory. As a result, directory IDs are functionally equivalent to file IDs, and both kinds of IDs are assigned from the same set of numbers.Directory IDs are long integers. The File Manager defines several constants to refer to special directory IDs that exist on every volume.
CONST fsRtParID = 1; {directory ID of root directory's parent} fsRtDirID = 2; {directory ID of volume's root directory}The root directory of every volume has a directory ID of 2. In addition, the root directory of every volume has a parent directory ID of 1. There is, however, no such parent directory; the constantfsRtParID
is provided solely for use by applications and File Manager routines that need to specify a parent ID when referring to the volume's root directory. For example, if you call thePBGetCatInfo
function when theioDirID
field is set tofsRtDirID
, the valuefsRtParID
is returned in theioDrParID
field.