Announces that your app is moving a file to a new URL.
- iOS 6.0+
- macOS 10.8+
- tvOS 9.0+
- watchOS 2.0+
The old location of the file or directory.
The new location of the file or directory.
This method is intended for apps that adopt App Sandbox.
Some apps need to rename files while saving them. For example, when a user adds an attachment to a rich text document, TextEdit changes the document’s filename extension from
.rtfd. In such a case, in a sandboxed app, you must call this method to declare your intent to rename a file without user approval.
After the renaming process succeeds, call the
item method, with the same arguments, to provide your app with continued access to the file under its new name, while also giving up access to any file that appears with the old name.
If your macOS app is not sandboxed, this method serves no purpose. This method is nonfunctional in iOS.