Reputation: 3619
I am implementing the NSFileProviderReplicatedExtension
and have problem understanding what triggers a directory enumeration (either enumerateItems
or enumerateChanges
.
My setup is as follows:
test/
folderenumerateItems
on the .workingSet
and then on the .rootContainer
and sees the test/
folder item in both with the itemVersion
set to v("1", "1")
.test/
folder through Findertest/file.txt
manager.signalEnumerator(for: .workingSet)
to re-enumerateenumerateChanges
on the .workingSet
in which I tell the observer that the test/
folder item didUpdate
with itemVersion
set to v("2", "2")
followed by finishEnumeratingChanges
My expectation was that at step #8 the system sees that the version of the test/
folder has changed, creates an enumerator for it and calls either enumerateItems
or enumerateChanges
to see that there is now a new file file.txt
in that folder.
But that doesn't happen. Is my above expectation wrong? Is there something other than itemVersion
that the system looks for when deciding whether to enumerate child items?
Upvotes: 1
Views: 110