---
title: "fileManager(_:shouldProceedAfterError:)"
framework: objectivec
role: symbol
role_heading: Instance Method
path: "objectivec/nsobject-swift.class/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.

## Declaration

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

## Return Value

Return Value YES if the operation (which is often continuous within a loop) should proceed, otherwise NO.

## Discussion

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 copyPath:toPath:handler:, movePath:toPath:handler:, removeFileAtPath:handler:, or linkPath:toPath:handler:. If an error occurs and your handler has not implemented this method, the invoking method automatically returns NO.

## See Also

### Deprecated Methods

- [accessibilityAttributeNames()](objectivec/nsobject-swift.class/accessibilityattributenames().md)
- [accessibilityAttributeValue(_:)](objectivec/nsobject-swift.class/accessibilityattributevalue(_:).md)
- [accessibilityAttributeValue(_:forParameter:)](objectivec/nsobject-swift.class/accessibilityattributevalue(_:forparameter:).md)
- [accessibilityActionDescription(_:)](objectivec/nsobject-swift.class/accessibilityactiondescription(_:).md)
- [accessibilityActionNames()](objectivec/nsobject-swift.class/accessibilityactionnames().md)
- [accessibilityArrayAttributeCount(_:)](objectivec/nsobject-swift.class/accessibilityarrayattributecount(_:).md)
- [accessibilityArrayAttributeValues(_:index:maxCount:)](objectivec/nsobject-swift.class/accessibilityarrayattributevalues(_:index:maxcount:).md)
- [accessibilityIndex(ofChild:)](objectivec/nsobject-swift.class/accessibilityindex(ofchild:).md)
- [accessibilityIsAttributeSettable(_:)](objectivec/nsobject-swift.class/accessibilityisattributesettable(_:).md)
- [accessibilityIsIgnored()](objectivec/nsobject-swift.class/accessibilityisignored().md)
- [accessibilityParameterizedAttributeNames()](objectivec/nsobject-swift.class/accessibilityparameterizedattributenames().md)
- [accessibilityPerformAction(_:)](objectivec/nsobject-swift.class/accessibilityperformaction(_:).md)
- [accessibilitySetOverrideValue(_:forAttribute:)](objectivec/nsobject-swift.class/accessibilitysetoverridevalue(_:forattribute:).md)
- [accessibilitySetValue(_:forAttribute:)](objectivec/nsobject-swift.class/accessibilitysetvalue(_:forattribute:).md)
- [fileManager(_:willProcessPath:)](objectivec/nsobject-swift.class/filemanager(_:willprocesspath:).md)
