Instance Method

fileManager:shouldProceedAfterError:movingItemAtPath:toPath:

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

Declaration

- (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error movingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;

Parameters

fileManager

The file manager object that attempted to move the item.

error

The error that occurred while trying to move the item in srcPath.

srcPath

The path of the file or directory that the file manager tried to move.

dstPath

The path of the intended destination for the item in srcPath.

Return Value

YES if the operation should proceed or NO if it should be aborted. If you do not implement this method, the file manager assumes a response of NO.

Discussion

The file manager calls this method when there is a problem moving the item to the specified location. If you return YES, the file manager proceeds to remove the item from its current location as if the move operation had completed successfully.

This method performs the same task as the fileManager:shouldProceedAfterError:movingItemAtURL:toURL: method, which is preferred over this method in macOS 10.6 and later.

See Also

Moving an Item

- fileManager:shouldMoveItemAtURL:toURL:

Asks the delegate if the file manager should move the specified item to the new URL.

- fileManager:shouldMoveItemAtPath:toPath:

Asks the delegate if the file manager should move the specified item to the new path.

- fileManager:shouldProceedAfterError:movingItemAtURL:toURL:

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