Hi all.
Question about SpotlightQuery class.
When we use the spotlight on Mac we have the option to select a folder or external drive for searching…
Is possible with SpotlightQuery,and if Yes how to ?
[quote]To specify the search scope
Send your instance of NSMetadataSearch a setSearchScopes: message, passing an array of the appropriate scopes.[/quote]
https://developer.apple.com/documentation/foundation/nsmetadataquery/1412155-searchscopes
I believe this is what you need:
https://developer.apple.com/documentation/foundation/nsmetadataquery/metadata_query_search_scopes