6

I'm using the Spotlight API (NSSMetadataQuery) in my application. I want to display a helpful note to the user if they try to do something that would do a Spotlight query on a volume which isn't indexed.

I can determine this in a terminal by running "mdutil -s /Volumes/Foo".

Is there an API which returns this information, that doesn't require running an external program?

user3642070
  • 101
  • 3

1 Answers1

1

Seems as though there's neither a documented method or written solution out there. The same question has been asked before to no avail on Apple's Mailing List, so I guess using NSTask and parsing the output (my rough sample code linked) would be one way to go about getting this information from a Cocoa app/programatically.

Seb Jachec
  • 3,003
  • 2
  • 30
  • 56