FileManagerDelegate
The interface a file manager’s delegate uses to intervene during operations or if an error occurs.
Declaration
protocol FileManagerDelegate : NSObjectProtocolOverview
The FileManagerDelegate protocol defines optional methods for managing operations involving the copying, moving, linking, or removal of files and directories. When you use an FileManager object to initiate a copy, move, link, or remove operation, the file manager asks its delegate whether the operation should begin at all and whether it should proceed when an error occurs.
The methods of this protocol accept either NSURL or NSString objects. The file manager always prefers methods that take an NSURL object over those that take an NSString object.
You should associate your delegate with a unique instance of the FileManager class, as opposed to the shared instance.
Topics
Moving an Item
fileManager(_:shouldMoveItemAt:to:)fileManager(_:shouldMoveItemAtPath:toPath:)fileManager(_:shouldProceedAfterError:movingItemAt:to:)fileManager(_:shouldProceedAfterError:movingItemAtPath:toPath:)
Copying an Item
fileManager(_:shouldCopyItemAt:to:)fileManager(_:shouldCopyItemAtPath:toPath:)fileManager(_:shouldProceedAfterError:copyingItemAt:to:)fileManager(_:shouldProceedAfterError:copyingItemAtPath:toPath:)
Removing an Item
fileManager(_:shouldRemoveItemAt:)fileManager(_:shouldRemoveItemAtPath:)fileManager(_:shouldProceedAfterError:removingItemAt:)fileManager(_:shouldProceedAfterError:removingItemAtPath:)