preserve custom folder icons in OSX

Scott Morrow scott at elementarysoftware.com
Mon Dec 1 03:24:21 EST 2008


I'm trying to add, as part of an installer app, the ability to  
reproduce any original custom folder icons in OSX (and perhaps OS9 as  
I think it uses the same mechanism).  In other words, I would like to  
be able to suck up the custom folder icon information along with  
everything else so that it can be restored when the folder is spit out  
elsewhere.

If I understand correctly, the folder icon is controlled by an  
invisible file named "Icon"&CR  (often referred to as "Icon\r") which  
contains an icon resource ("icns",-16455). Additionally, I believe the  
folder itself needs to have a flag set in order for it to accept this  
icon.

I can't seem to touch or otherwise get a peek at the resource inside  
the icon\r file without first renaming it to something without the  
carriage return.

I haven't tried to figure out the folder flag yet.  Any suggestions  
gladly accepted.

Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web       http://elementarysoftware.com/
email     scott at elementarysoftware.com
------------------------------------------------------







More information about the use-livecode mailing list