开发者

Obj-C equivalent for mdfind?

Is there a way to do a Spotlight query, in Obj-C, similar to what mdfind doe开发者_StackOverflow社区s? I need to write a method with the following signature:

-(NSString *)mdfind:(NSString *)theFileToLookFor

where the returned NSString is the first path found by the search.

Any help will be really appreciated.


NSMetadataQuery is the wrapper around the Carbon-level MDQuery API, which is how one interacts with the user's spotlight database.


the apis are in CoreServices.framework. start with the ones which have the prefix MDQuery

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜