Platforms to show: All Mac Windows Linux Cross-Platform

NSFileCoordinatorMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class iCloud MBS MacCloud Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The class for file coordinating.

Please also check the documentation from Apple for the NSFileCoordinator class.

Reading flag constants.

Constant Value Description
NSFileCoordinatorReadingResolvesSymbolicLink 2 Whether reading of an item that might be a symbolic link file causes the resolution of the link if it is. This affects the URL passed to the block passed to an invocation of one of the coordinateReadingItemAtURL... methods. This is not a valid option to use with prepareForReadingItemsAtURLs.
NSFileCoordinatorReadingWithoutChanges 1 Whether reading does _not_ trigger sending of savePresentedItemChangesWithCompletionHandler to certain NSFilePresenters in the system and waiting for those NSFilePresenters to respond. The default behavior during coordinated reading is to send savePresentedItemChangesWithCompletionHandler to NSFilePresenters.

Writing flag constants.

Constant Value Description
NSFileCoordinatorWritingForDeleting 1 Whether the writing to be done is actually the deletion of the item. This affects how the writing waits for previously scheduled coordinated reading and writing, how the writing causes subsequently scheduled reading and writing to wait, and what NSFilePresenter messaging is done. See the comments in the Single File Coordination section below. This option is how you trigger sending of accommodatePresentedItemDeletionWithCompletionHandler or accommodatePresentedSubitemDeletionAtURL messages to NSFilePresenters. more
NSFileCoordinatorWritingForMerging 4 Whether coordinated writing triggers sending of savePresentedItemChangesWithCompletionHandler to certain NSFilePresenters in the system and waiting for those NSFilePresenters to respond.
NSFileCoordinatorWritingForMoving 2 Whether the writing to be done is actually the moving or renaming of the item. This affects how the writing waits for previously scheduled coordinated reading and writing, how the writing causes subsequently scheduled reading and writing to wait, and what NSFilePresenter messaging is done. See the comments in the Single File Coordination section below. This option has no effect when what's being moved is a plain file so you can use it in code that moves file system items without checking whether the items are files or directories. Any such check would invite a race condition anyway. more
NSFileCoordinatorWritingForReplacing 8 Whether the writing to be done is actually the replacement of the item with a different item. It causes the same behavior as NSFileCoordinatorWritingForDeleting except that when the item being written to is renamed or moved while the writer is being made to wait the item is considered to have been a different item, so the writer is not passed an updated URL to reflect the renaming or moving. Use this when the moving or creation of an item will replace any item that gets in its way. To avoid a race condition use it regardless of whether there is actually an item in the way before the writing begins. Don't use this when simply updating the contents of a file, even if the way you do that is writing the contents to another file and renaming it into place. This is not a valid option to use with prepareForReadingItemsAtURLs. more

This class has no sub classes.

Blog Entries


The items on this page are in the following plugins: MBS MacCloud Plugin.


NSExpressionMBS   -   NSFileHandleMBS


The biggest plugin in space...