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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With