Edit AllPages

An FSRef is an opaque data structure that refers to an existing file system object (i.e. file, directory, volume). It is part of the CoreServices File Manager (aka Carbon File Manager).

An FSRef can only refer to existing objects, and it is not a permanent reference. As such:

One should not assume an FSRef is still valid after:

To refer to a file you wish to create, use an FSRef to the parent folder and a unicode string for the new filename (see FSCreateFileUnicode()).

Since FSRef is opaque:

Although opaque, it’s documented as 80 bytes in Files.h, and memcpy() can be used to copy one.

An Alias provides several features that FSRef does not:

An alias is also opaque.

Interfacing with Cocoa:

Other Notes:

The following NSString category methods, from the NDAlias project, convert NSString (full path) <-> FSRef: