An NSFile
object sends this message to its handler for each error it encounters when copying, moving, removing, or linking files or directories.
Deprecated
See delegate methods for copy, move, remove, and link methods.
SDKs
- iOS 2.0–2.0Deprecated
- macOS 10.0–10.5Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
Framework
- Foundation
Declaration
func fileManager(_ fm: File Manager, shouldProceedAfterError errorInfo: [Any Hashable : Any]) -> Bool
Parameters
manager
The file manager that sent this message.
errorInfo
A dictionary that contains two or three pieces of information (all
NSString
objects) related to the error:Key
Value
@"Path"
The path related to the error (usually the source path)
@"Error"
A description of the error
@"To
Path" The destination path (not all errors)
Return Value
true
if the operation (which is often continuous within a loop) should proceed, otherwise false
.
Discussion
An NSFile
object, manager
, sends this message for each error it encounters when copying, moving, removing, or linking files or directories. The return value is passed back to the invoker of copy
, move
, remove
, or link
. If an error occurs and your handler has not implemented this method, the invoking method automatically returns false
.