ZDCNodeAnchor

@interface ZDCNodeAnchor : NSObject <NSCoding, NSCopying>

When a node is located in a different bucket (not the localUser’s bucket), then the ZDCNodeAnchor class is used as a reference point for the foreign node.

The ZDCNodeAnchor class is immutable.

  • Creates a new anchor instance using the given properties.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUserID:(nonnull NSString *)userID
                                    treeID:(nonnull NSString *)treeID
                                 dirPrefix:(nonnull NSString *)dirPrefix;

    Swift

    init(userID: String, treeID: String, dirPrefix: String)
  • The userID who owns the bucket in which the node resides. (userID == ZDCUser.uuid)

    The corresponding AWS region & bucket can be fetched from the ZDCUser.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull userID;

    Swift

    var userID: String { get }
  • Corresponds to [ZDCCloudPath treeID].

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull treeID;

    Swift

    var treeID: String { get }
  • Corresponds to [ZDCCloudPath dirPrefix].

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull dirPrefix;

    Swift

    var dirPrefix: String { get }