Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MetaDataQuery.SetSearchScopes

Sets the search scopes.

Component Version macOS Windows Linux Server iOS SDK
MetaDataQuery 8.0 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes
MBS( "MetaDataQuery.SetSearchScopes"; Query; SearchScopes )   More

Parameters

Parameter Description Example
Query The reference number of the query. $query
SearchScopes The list of search scopes. "LocalComputerScope"

Result

Returns OK or error.

Description

Sets the search scopes.
Please pass a list with file paths and special keywords used to specify specific locations:

KeyDescription
UserHomeScopeSearch the user’s home directory.
LocalComputerScopeSearch all local mounted volumes, including the user home directory. The user’s home directory is searched even if it is a remote volume.
NetworkScopeSearch all user-mounted remote volumes.
UbiquitousDocumentsScopeSearch all files in the Documents directories of the app’s iCloud container directories.
UbiquitousDataScopeSearch all files not in the Documents directories of the app’s iCloud container directories.
AccessibleUbiquitousExternalDocumentsScopeSearch for documents outside the app’s container. This search can locate iCloud documents that the user previously opened using a document picker view controller. This lets your app access the documents again without requiring direct user interaction.
IndexedLocalComputerScopeSearch all indexed local mounted volumes including the current user’s home directory (even if the home directory is remote).
IndexedNetworkScopeSearch all indexed user-mounted remote volumes.

Examples

Search home folder:

MBS( "MetaDataQuery.SetSearchScopes"; $Query; "UserHomeScope" )

Search application folder:

MBS( "MetaDataQuery.SetSearchScopes"; $Query; "/Applications" )

See also

This function checks for a license.

Created 16th December 2017, last changed 16th December 2017


MetaDataQuery.SetScript - MetaDataQuery.StartQuery