Identifies a directory or file, including a volume’s root directory.
- macOS 10.0+
- Core Services
This data type’s purpose is similar to an
FSSpec except that an
FSRef is completely opaque. An
FSRef contains whatever information is needed to find the given object; the internal structure of an
FSRef is likely to vary based on the volume format, and may vary based on the particular object being identified.
The client of the File Manager cannot examine the contents of an
FSRef to extract information about the parent directory or the object’s name. Similarly, an
FSRef cannot be constructed directly by the client; the
FSRef must be constructed and returned via the File Manager. There is no need to call the File Manager to dispose an
To determine the volume, parent directory and name associated with an
FSRef, or to get an equivalent
FSSpec, use the