I have an object which conforms to NSFilePresenter protocol that represents my document-based application document package. When a new file is created inside the package, either programmatically using NSFileManager with proper NSFileCoordination methods or via Finder i only got -presentedSubitemDidChangeAtURL:
event, but not seeming so obvious in this case -presentedSubitemDidAppearAtURL:
.
Is this an expected behavior or i am doing something wrong?
The comments on -presentedSubitemDidAppearAtURL:
in NSFilePresenter state it clear:
Be notified that a file or directory contained by the directory has been added. If this method is not implemented but
-presentedItemDidChange
is, and the directory is actually a file package, then the file coordination machinery will invoke-presentedItemDidChange
instead.
-presentedItemDidChange
? – LibbielibbnaNSFilePresenter
. – Araucania