MacOS - resource forks

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

MacOS - resource forks

Post by cormullion »

Sorry for yet another Mac post (in the Linux forum...), but I've discovered how to work with resource forks (weird Mac technology from the old days :-))... You can access resource forks using the "/rsrc" form, although the 'file?' function can't see them.

(set 'sysfontdir "/System/Library/Fonts/")
(set 'item "HelveLTMM")
(println (exec (format "ls -alt '%s%s/rsrc'" sysfontdir item )))
; -> ("-rw-r--r-- 1 root wheel 181804 Mar 28 2005 /System/Library/Fonts/HelveLTMM/rsrc")
(println (file? (format "'%s%s/rsrc'" sysfontdir item )))
; -> nil

Locked