Asks the delegate if the operation should continue after an error occurs while removing the item at the specified URL.
SDKs
- iOS 4.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
optional func fileManager(_ fileManager: File Manager, shouldProceedAfterError error: Error, removingItemAt URL: URL) -> Bool
Parameters
fileManager
The file manager object that attempted to remove the item.
error
The error that occurred while attempting to remove the item at
URL
.URL
The URL for the file or directory that the file manager tried to delete.
Return Value
true
if the operation should proceed or false
if it should be aborted. If you do not implement this method, the file manager assumes a response of false
.
Discussion
The file manager calls this method when there is a problem deleting the item to the specified location. If you return true
, the file manager continues deleting any remaining items and ignores the error.
This method performs the same task as the file
method and is preferred over that method in macOS 10.6 and later.