Add metadata to my files for Spotlight
Add metadata to my files for Spotlight
- Subject: Add metadata to my files for Spotlight
- From: Lorenzo <email@hidden>
- Date: Tue, 10 May 2005 12:26:42 +0200
Hi,
I am trying to add metadata to the files saved by my application and I have
some question. Actually my file is an XML file I save from a
NSMutableDictionary, so I thought it should be easy to add the metadata
therein as a dictionary that I can recall later from the metadata importer
using the key @"metadata". Then I can search within this dictionary for each
key like "kMDItemAuthors".
1.__________
First of all I don't know whether the method I mentioned above is the right
one. I have not seen any documentation about writing metadata but only
documentation on how to write an importer. Any link to the docs or some
sample code would be appreciated.
2.__________
Second, I have seen a sample code on how to write an importer, which uses
this statement within the call GetMetadataForFile.
tempDict = [[NSDictionary alloc]
initWithContentsOfFile:(NSString*)pathToFile];
So I suppose that, if my file is large 1GB, the whole file should be loaded
within the variable tempDict...
If so, the method I mentioned above is not the right one. Any suggestion?
3.__________
When I try to reproduce the sample at the point 2, using Cocoa APIs, the
metadata importer template requires the Cocoa framework. I linked that and I
added the line
#import <Cocoa/Cocoa.h>
But now it won't compile. It says "Undefined symbols:_GetMetadataForFile".
Any idea?
Thank you.
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden