DBFILESCommitInfo

Objective-C

@interface DBFILESCommitInfo : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESCommitInfo : NSObject, DBSerializable, NSCopying

The CommitInfo struct.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • Path in the user’s Dropbox to save the file.

    Declaration

    Objective-C

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

    Swift

    var path: String { get }
  • Selects what to do if the file already exists.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBFILESWriteMode *_Nonnull mode;

    Swift

    var mode: DBFILESWriteMode { get }
  • If there’s a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull autorename;

    Swift

    var autorename: NSNumber { get }
  • The value to store as the clientModified timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSDate *clientModified;

    Swift

    var clientModified: Date? { get }
  • Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn’t result in a user notification.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull mute;

    Swift

    var mute: NSNumber { get }
  • List of custom properties to add to file.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSArray<DBFILEPROPERTIESPropertyGroup *> *propertyGroups;

    Swift

    var propertyGroups: [DBFILEPROPERTIESPropertyGroup]? { get }
  • Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = update in DBFILESWriteMode and the given “rev” doesn’t match the existing file’s “rev”, even if the existing file has been deleted. This also forces a conflict even when the target path refers to a file with identical contents.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull strictConflict;

    Swift

    var strictConflict: NSNumber { get }

Constructors

  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPath:(nonnull NSString *)path
                                    mode:(nullable DBFILESWriteMode *)mode
                              autorename:(nullable NSNumber *)autorename
                          clientModified:(nullable NSDate *)clientModified
                                    mute:(nullable NSNumber *)mute
                          propertyGroups:
                              (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)
                                  propertyGroups
                          strictConflict:(nullable NSNumber *)strictConflict;

    Swift

    init(path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?)

    Parameters

    path

    Path in the user’s Dropbox to save the file.

    mode

    Selects what to do if the file already exists.

    autorename

    If there’s a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.

    clientModified

    The value to store as the clientModified timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.

    mute

    Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn’t result in a user notification.

    propertyGroups

    List of custom properties to add to file.

    strictConflict

    Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = update in DBFILESWriteMode and the given “rev” doesn’t match the existing file’s “rev”, even if the existing file has been deleted. This also forces a conflict even when the target path refers to a file with identical contents.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPath:(nonnull NSString *)path;

    Swift

    init(path: String)

    Parameters

    path

    Path in the user’s Dropbox to save the file.

    Return Value

    An initialized instance.