fileManager(_:shouldProceedAfterError:copyingItemAt:to:)
Asks the delegate if the move operation should continue after an error occurs while copying the item at the specified URL.
Declaration
optional func fileManager(_ fileManager: FileManager, shouldProceedAfterError error: any Error, copyingItemAt srcURL: URL, to dstURL: URL) -> BoolParameters
- fileManager:
The file manager object that attempted to copy the item.
- error:
The error that occurred during the attempt to copy.
- srcURL:
The URL or a file or directory that
fileManageris attempting to copy. - dstURL:
The URL or a file or directory to which
fileManageris attempting to copy.
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 copying the item to the specified location. If you return true, the file manager continues copying any other items and ignores the error.
This method performs the same task as the fileManager(_:shouldProceedAfterError:copyingItemAtPath:toPath:) method and is preferred over that method in macOS 10.6 and later.