2

I have a directory of plain text files in ~/Library/Application Support/MyApp/Spotlight/. I understand that Spotlight stopped indexing the Library in 10.5, but is there a way to force Spotlight to include a single sub-directory in its index?

I've tried wrapping mdimport in an NSTask, and the debug output says that the file has been imported, but it does not show up in Spotlight results.

@bbum's answer here leads me to believe this should be trivial, but I'm at a loss.

Any help or pointers are greatly appreciated.

Thanks.

4

1 回答 1

2

如果您将文件放在~/Caches/Metadata/$(YOUR_APP_NAME). 这也是 Safari 将其书签元数据放入 Spotlight 索引的地方。

于 2012-01-09T11:26:13.353 回答