Contents

MDQuery

Overview

MDQuery is a CF-compliant object, follows the CF conventions,and can be used with the CF polymorphic functions, such as CFRetain.MDQuery encapsulates queries against the System store of the filemetadata.

An MDQuery normally executes asynchronously and posts progressnotifications as the results are collected. During the gatheringphase the query results conform to the specified value lists andsorting.

MDQuery gathers results and processes updates only while thecurrent thread's run loop is running.

For functions that take an MDQueryRef parameter, if this parameteris not a valid MDQueryRef, the behavior is undefined. NULL isnot a valid MDQueryRef.

For functions that take CF*Ref parameters, such as CFStringRefand CFArrayRef, if this parameter is not a valid CF object of thecorrect type, the behavior is undefined. NULL isnot a valid CF*Ref.

Topics

Creating Queries

Getting and Setting Query Parameters

Setting Callback Functions

Starting, Stopping and Pausing Queries

Getting Query Result Values

Getting the Type Identifier

Callbacks

Batching Parameters

Miscellaneous

Query Option Flags

Notifications

Notification Info Keys

See Also

Related Documentation