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:.

See Also

Coordinating File Operations Synchronously

- coordinateReadingItemAtURL:options:error:byAccessor:

Initiates a read operation on a single file or directory using the specified options.

- coordinateWritingItemAtURL:options:error:byAccessor:

Initiates a write operation on a single file or directory using the specified options.

- coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:

Initiates a read operation that contains a follow-up write operation.

- coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor:

Initiates a write operation that involves a secondary write operation.

- prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:

Prepare to read or write from multiple files in a single batch operation.

- itemAtURL:willMoveToURL:

Announces that your app is moving a file to a new URL.

- cancel

Cancels any active file coordination calls.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software