<!--
{
  "availability" : [
    "iOS: 2.0.0 - 2.0.0",
    "iPadOS: 2.0.0 - 2.0.0",
    "tvOS: 9.0.0 - 9.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 2.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/fileManager(_:shouldProceedAfterError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)fileManager:shouldProceedAfterError:"
  },
  "title" : "fileManager(_:shouldProceedAfterError:)"
}
-->

# fileManager(_:shouldProceedAfterError:)

An `NSFileManager` object sends this message to its handler for each error it encounters when copying, moving, removing, or linking files or directories.

```
func fileManager(_ fm: FileManager, shouldProceedAfterError errorInfo: [AnyHashable : Any]) -> Bool
```

## Parameters

`fm`

The file manager that sent this message.

`errorInfo`

A dictionary that contains two or three pieces of information (all <doc://com.apple.documentation/documentation/Foundation/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                             |
    |`@"ToPath"`|The destination path (not all errors)                  |

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if the operation (which is often continuous within a loop) should proceed, otherwise [`NO`](/documentation/ObjectiveC/NO).

## Discussion

An `NSFileManager` 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 <doc://com.apple.documentation/documentation/Foundation/NSFileManager/copyPath:toPath:handler:>, <doc://com.apple.documentation/documentation/Foundation/NSFileManager/movePath:toPath:handler:>, <doc://com.apple.documentation/documentation/Foundation/NSFileManager/removeFileAtPath:handler:>, or <doc://com.apple.documentation/documentation/Foundation/NSFileManager/linkPath:toPath:handler:>. If an error occurs and your handler has not implemented this method, the invoking method automatically returns [`NO`](/documentation/ObjectiveC/NO).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)