Creating kMDMattsCoolMetadata?

Uli Kusterer kusterer at gmail.com
Fri Feb 9 01:13:57 PST 2007


Am 08.02.2007 um 23:51 schrieb Matt Johnston:
> There's a heap of stuff on CocoaDev - but seems to be a lot of  
> people asking the same question. We can read the stores, but how do  
> we just set a single metadata item?
>
> Can anyone either put me out of my misery or point me at a helpful  
> article?

  Well, if you have your own importer and it's only for file types  
that importer claims, you can just declare your own types. The  
Spotlight MDImporter docs cover that nicely.

  Otherwise, the only game in town currently seem to be the set/ 
getxattr calls, which let you set arbitrary attributes on a file.  
Though I think there was some catch to this, like Spotlight removing  
some of them, or Spotlight not indexing them... something along that  
line, not sure anymore.

  A google for "setxattr" should give you what you need.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de





More information about the MacOSX-dev mailing list