ZDCNodeConflict

enum ZDCNodeConflict {}

Used as a flag passed to -[ZeroDarkCloudDelegate didDiscoverConflict:forNode:atPath:transaction:], which tells the delegate about the conflict that was encountered.

  • A treesystem path is in conflict:

    • there’s a local node at path X
    • it hasn’t been uploaded to the cloud yet, or it’s been moved, and the move operation hasn’t hit the cloud yet
    • a new node is discovered in the cloud with the same path X

    Since two nodes cannot occupy the same path, this means the local node will need to adapt. The conflict can be resolved by performing one of the following options:

    Option A:

    • rename the node so it’s no longer a conflict (i.e. change node.name)
    • be sure to invoke [ZDCCloudTransaction modifyNode:]

    Option B:

    • delete the node
    • be sure to invoke [ZDCCloudTransaction deleteNode:]

    If you do nothing, the system will automatically perform option A for you.

    Declaration

    Objective-C

    ZDCNodeConflict_Path

    Swift

    case path = 0
  • Your node data is out-of-date:

    • you previously queued an operation to upload a node’s data to the cloud
    • however, a different device has updated the node’s data (in the cloud) since the operation was enqueued
    • thus it’s no longer safe to upload the version we have locally

    The conflict can be resolved by performing one of the following options:

    Option A:

    • skip the queued data upload
    • use [ZDCCloudTransaction skipDataUploadsForNodeID:]

    Option B:

    • download the latest version of the node, and merge the changes
    • use [ZDCCloudTransaction didMergeDataWithETag:forNodeID:]

    For more information about merging changes in ZeroDark.cloud, see the docs.

    Declaration

    Objective-C

    ZDCNodeConflict_Data

    Swift

    case data = 1
  • Unable to perform graft because the destination user’s account has been deleted.

    Declaration

    Objective-C

    ZDCNodeConflict_Graft_DstUserAccountDeleted

    Swift

    case graft_DstUserAccountDeleted = 2
  • Unable to perform graft because the destination node doesn’t grant us appropriate permission(s).

    Declaration

    Objective-C

    ZDCNodeConflict_Graft_DstNodeNotReadable

    Swift

    case graft_DstNodeNotReadable = 3
  • Unable to perform graft because the destination node has been deleted.

    Declaration

    Objective-C

    ZDCNodeConflict_Graft_DstNodeNotFound

    Swift

    case graft_DstNodeNotFound = 4