Okay, so I've written a script that uses
mdfind to more quickly match files, however, I need to find the best way to check whether a target directory is indexed or not, so I can fall back to using
find instead if I have to.
I'm assuming I'll need to use
mdls, however this does still return information about non-index files and folders, just less of it. Is there a particular value I should query that will allow me to easily determine whether a file/folder has been index by Spotlight or not?