Page 1 of 1

MacOS - resource forks

Posted: Fri Dec 02, 2005 12:20 pm
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