<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManagerDelegate/fileManager(_:shouldProceedAfterError:copyingItemAtPath:toPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFileManagerDelegate(im)fileManager:shouldProceedAfterError:copyingItemAtPath:toPath:"
  },
  "title" : "fileManager(_:shouldProceedAfterError:copyingItemAtPath:toPath:)"
}
-->

# fileManager(_:shouldProceedAfterError:copyingItemAtPath:toPath:)

Asks the delegate if the move operation should continue after an error occurs while copying the item at the specified path.

```
optional func fileManager(_ fileManager: FileManager, shouldProceedAfterError error: any Error, copyingItemAtPath srcPath: String, toPath dstPath: String) -> Bool
```

## Parameters

`fileManager`

The `NSFileManager` object that sent this message.

`error`

The error that occurred during the attempt to copy.

`srcPath`

The path or a file or directory that `fileManager` is attempting to copy.

`dstPath`

The path or a file or directory to which `fileManager` is attempting to copy.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the operation should proceed or <doc://com.apple.documentation/documentation/Swift/false> if it should be aborted. If you do not implement this method, the file manager assumes a response of <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The file manager calls this method when there is a problem copying the item to the specified location. If you return <doc://com.apple.documentation/documentation/Swift/true>, the file manager continues copying any other items and ignores the error.

This method performs the same task as the [`fileManager(_:shouldProceedAfterError:copyingItemAt:to:)`](/documentation/Foundation/FileManagerDelegate/fileManager(_:shouldProceedAfterError:copyingItemAt:to:)) method, which is preferred over this method in macOS 10.6 and later.

## See Also

[`-  copyItemAtPath:toPath:error:`](/documentation/Foundation/FileManager/copyItem(atPath:toPath:))

Copies the item at the specified path to a new location synchronously.

[`-  copyItemAtURL:toURL:error:`](/documentation/Foundation/FileManager/copyItem(at:to:))

Copies the file at the specified URL to a new location synchronously.



---

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)