Access to MDItem "oid" property

Hi,

In implementing MDQuery which tracks file changes - I have noticed that when receiving the "kMDQueryUpdateRemovedItems" notification - the item path is null.
In order to track the file creation/update/removal life cycle - I need some common "thread". It seems like internally MDItem has a unique identifier field called "oid" - however it is not exposed through public API.
It seems like relying on the pointer is a bit of a "medieval" solution, so the question is - how do I get access to the "oid" please?

Thanks.

Replies

In order to track the file creation/update/removal life cycle - I need
some common "thread".

Normally you’d doing this using the MDItem itself. Is that not working for you?

Alternatively, you could install a custom create result function (MDQuerySetCreateResultFunction) to have the query vend your model objects directly.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"