The interface a file manager's delegate uses to intervene during operations or if an error occurs.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
NSFile protocol defines optional methods for managing operations involving the copying, moving, linking, or removal of files and directories. When you use an
NSFile 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.
You should associate your delegate with a unique instance of the
NSFile class, as opposed to the shared instance.