tags:

views:

83

answers:

3

Is there a unix tool to which I can pass a file and have it tell me where the icon for the file is coming from?

What I am looking for is something like this:

$WhoProvidedIcon /Path/To/file.myex

UTI: com.myapplication.document

PLIST: /path/to/myapplication.app/Contents/Info.plist

ICON: /path/to/myapplication.app/Contents/Resources/BaseDoc.icns

+2  A: 

Icons for most applications on Mac OSX are stored within the app bundle themselves. If you right click on the .app and then select Show Package Contents then go to Contents -> Resources you should see the icon in there.

James Raybould
Thanks, but I wasn't clear enough. I have edited my question.
ericgorr
A: 

I don't know of any specific tools that provide this information. However, it sounds like you have overlapping extensions. If Finder.app is showing an icon for a file then you should be able to just look in the info window for the file and see what application is listed to open the document by default. Then look at the .plist file for that application to see if it is using your extension. The info window should also say what kind of document it is which could be useful if the application that is supplying the icon has been deleted, or otherwise not listed as the default application.

theMikeSwan
It is not that simple. There are multiple versions of the same application all of whom are claiming the same extension. It is possible that one of them has become corrupted, but I don't think the finder is going to tell me which one, if that is indeed the case. Hence, the potential need for a tool to tell me from where the finder has actually obtained the icon for the file.
ericgorr
A: 
ericgorr