I am writing a MacFuse plugin, and would like finder to use the appropriate icons & launch the appropriate app when a file is opened.
It is not possible for me to add an extension to the file, so my only other option in Snow Leopard is the NSFileHFSTypeCode. I have reviewed all of the codes registered on my machine using http://www.rubicode.com/Software/RCDefaultApp/ and I can see that some of the codes are associated with UTIs. For example 'TEXT'
is associated with the uniform type identifier (UTI) com.apple.traditional-mac-plain-text
.
I would like to be able to associate some of these 4-char codes with other UTIs. For example PHPf
to public.php-script
. I imagine that there's some kind of framework or command line utility that would allow me to do this, but I have not been able to find it.