SpotlightQuery and external drive(solved)

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 ?

https://developer.apple.com/library/content/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/QueryingMetadata.html

[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

If you use MBS Plugins, you have all the options in our MDQueryMBS class.