I would like to modify a Spotlight metadata attribute of a file within my application (i.e. not in a Spotlight importer) but I can't find any API for doing so. Is it possible? Pointers to the relevant docs would be ideal.
In case it's helpful, here's my use case:
I want to store a reference to a file system path in a Core Data store. Ideally, I should be able to find the file even if is moved, potentially across mounted volumes. My understanding is that an archived FSRef or AliasRecord will not do the trick because they are not invariant wrt to moves across mounted volumes. So my plan was to store a URL and also to add a UUID (also stored in the data store) to the file's Spotlight metadata so that I could perform a Spotlight query for that UUID if the URL no longer pointed to the file when the app goes back to look for the file.