Instance Method

itemAtURL:didMoveToURL:

Notifies relevant file presenters that the location of a file or directory changed.

Declaration

- (void)itemAtURL:(NSURL *)oldURL didMoveToURL:(NSURL *)newURL;

Parameters

oldURL

The old location of the file or directory.

newURL

The new location of the file or directory.

Discussion

If you move or rename a file or directory as part of a write operation, call this method to notify relevant file presenters that the change occurred. This method calls the presentedItemDidMoveToURL: method for any of the item’s file presenters. If the item is a directory, this method calls presentedItemDidMoveToURL: on the file presenters for the item’s contents. Finally, it calls presentedSubitemAtURL:didMoveToURL: on the file presenter of any directory containing the item.

You must call this method from a coordinated write block. Calling this method with the same URL in the oldURL and newURL parameters is harmless. This call must balance a call to itemAtURL:willMoveToURL:.