I just came across something interesting, at least it is to me
because I haven't heard of this before. It appears that MacOS X adds
resources to files.
I was looking at the resource forks of a few files I've created and
noticed a resource type I've never seen before. I found it after
changing the application binding, the 'Open With Application' menu in
the Get Info dialog. The resource type is 'usro', ID 0 and 1028
bytes in length. I can't find any mention of it on Apple's website.
It turns out that it's holding the absolute UNIX style path of the
application that opens that document.
Since it's ID is 0, IIRC Apple reserves all IDs below 128, it
shouldn't be a problem. I did find that if the Finder finds a 'usro'
type with the same ID but without the correct information it will
overwrite the original. That is unless its an empty resource.
I deleted the resource's data and tried changing the application
binding. In trying it the Finder gave me a 'The operation could not
be completed' (error -39) the first time and a second try caused the
Finder to crash. That error is an EOF error so that makes sense.
Worse is if the resource contains data. I filled the resource with
some random hex data, more than the Finder did. The Finder overwrote
_some_ of the resource with it's own data but didn't zero out the
unused portion.
In addition, if the application isn't the default application, the
Finder adds a 'icns' type resource (ID -16455) of the other
application.
I just thought people might want to know.
--
Heather Donahue