That's very clear, thanks! I now see how currentSyncAnchor, enumerateItems, and enumerateChanges work together for the working set.
One more thing I'd like to clarify: what is the role of currentSyncAnchor for containers other than the working set?
From the earlier answers I understand that:
changes are enumerated (enumerateChanges) only for the working set (https://developer.apple.com/forums/thread/831358), and
a folder's items are enumerated (enumerateItems) only once or twice (https://developer.apple.com/forums/thread/831323).
Yet currentSyncAnchor is also called on per-folder enumerators. If the system never asks a folder "what changed since this anchor?", I don't see what that anchor is used for.
Practically: can I return the same anchor for every folder that I currently return for the working set, i.e. one global backend version shared by the working set and all folders? Or is there a reason to scope or optimize it per container?
Topic:
Core OS
SubTopic:
File Systems Q&A
Tags: