---
title: "fileManager(_:shouldProceedAfterError:copyingItemAtPath:toPath:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filemanagerdelegate/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.

## Declaration

```swift
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

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

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:copyingItemAt:to:) method, which is preferred over this method in macOS 10.6 and later.

## See Also

### Related Documentation

- [copyItem(atPath:toPath:)](foundation/filemanager/copyitem(atpath:topath:).md)
- [copyItem(at:to:)](foundation/filemanager/copyitem(at:to:).md)

### Copying  an Item

- [fileManager(_:shouldCopyItemAt:to:)](foundation/filemanagerdelegate/filemanager(_:shouldcopyitemat:to:).md)
- [fileManager(_:shouldCopyItemAtPath:toPath:)](foundation/filemanagerdelegate/filemanager(_:shouldcopyitematpath:topath:).md)
- [fileManager(_:shouldProceedAfterError:copyingItemAt:to:)](foundation/filemanagerdelegate/filemanager(_:shouldproceedaftererror:copyingitemat:to:).md)
