Expand description
Classic Mac alias resolution.
Parses the alis resource record stored in a file’s resource fork
(the marker for aliases is kIsAlias/0x8000 in FInfo.fdFlags).
We extract just enough to show the user where an alias points:
- Target filename (from the fixed portion at offset 50)
- Volume name (from the fixed portion at offset 10)
- Optional absolute path from tagged record 18 (UTF-8) or 2 (MacRoman)
We do not attempt to follow the alias; the target may no longer exist.
Constants§
- IS_
ALIAS_ FLAG - Finder flag bit indicating the file is an alias.
- RHAP_
CREATOR - Creator code for classic HFS+ UNIX symlinks.
- SLNK_
TYPE - Type code for classic HFS+ UNIX symlinks.
Functions§
- find_
alis_ in_ resource_ fork - Parse a resource fork and return the data bytes of the first
alisresource, if any. - parse_
alis_ record - Parse an
alisresource record and return a human-readable target string like"Volume:TargetName", or an absolute path when one is present. - resolve_
alias_ target - One-shot helper: given raw resource-fork bytes, return a display string
for the alias target, or
Noneif noalisresource is present / parseable.