title: The file an IconRef comes from
body: <p>Is there any way to find out the .icns file an IconRef refers to or has been loaded from? Or even the id of the containing bundle if there is one?</p>
  
  <p>I understand that not all icons are loaded directly from a file (composite icons for example) so this wouldn't work all the time.</p>
  
  <p>The question I'm trying to answer is "Where does the icon the Finder would display for file X originate?" Note that I'm interested in the origin of the icon in the file system, not the icon's image data. As far as I can tell, the workings behind going from file path to icon - eg. GetIconRefFromFileInfo and NSWorkspace.iconForFile - are fairly opaque.</p>
  
  <p>I'm open to undocumented/private solutions if that's what it takes.</p>
  
  <p>@millenomi:
  Yes, avoiding Apple's icons is the point of the exercise.</p>