DBFILESWriteError

Objective-C

@interface DBFILESWriteError : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESWriteError : NSObject, DBSerializable, NSCopying

The WriteError union.

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

Instance fields

  • tag

    Represents the union’s current tag state.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBFILESWriteErrorTag tag;

    Swift

    var tag: DBFILESWriteErrorTag { get }
  • The given path does not satisfy the required path format. Please refer to the Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats for more information. - note: Ensure the isMalformedPath method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *malformedPath;

    Swift

    var malformedPath: String? { get }
  • Couldn’t write to the target path because there was something in the way.

    Note

    Ensure the isConflict method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBFILESWriteConflictError *_Nonnull conflict;

    Swift

    var conflict: DBFILESWriteConflictError { get }

Constructors

  • Initializes union class with tag state of “malformed_path”.

    Description of the “malformed_path” tag state: The given path does not satisfy the required path format. Please refer to the Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats for more information.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMalformedPath:
        (nullable NSString *)malformedPath;

    Swift

    init(malformedPath: String?)

    Parameters

    malformedPath

    The given path does not satisfy the required path format. Please refer to the Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats for more information.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “conflict”.

    Description of the “conflict” tag state: Couldn’t write to the target path because there was something in the way.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithConflict:
        (nonnull DBFILESWriteConflictError *)conflict;

    Swift

    init(conflict: DBFILESWriteConflictError)

    Parameters

    conflict

    Couldn’t write to the target path because there was something in the way.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “no_write_permission”.

    Description of the “no_write_permission” tag state: The user doesn’t have permissions to write to the target location.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithNoWritePermission;

    Swift

    init(noWritePermission: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “insufficient_space”.

    Description of the “insufficient_space” tag state: The user doesn’t have enough available space (bytes) to write more data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInsufficientSpace;

    Swift

    init(insufficientSpace: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “disallowed_name”.

    Description of the “disallowed_name” tag state: Dropbox will not save the file or folder because of its name.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDisallowedName;

    Swift

    init(disallowedName: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “team_folder”.

    Description of the “team_folder” tag state: This endpoint cannot move or delete team folders.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTeamFolder;

    Swift

    init(teamFolder: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “operation_suppressed”.

    Description of the “operation_suppressed” tag state: This file operation is not allowed at this path.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOperationSuppressed;

    Swift

    init(operationSuppressed: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “too_many_write_operations”.

    Description of the “too_many_write_operations” tag state: There are too many write operations in user’s Dropbox. Please retry this request.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTooManyWriteOperations;

    Swift

    init(tooManyWriteOperations: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “other”.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOther;

    Swift

    init(other: ())

    Return Value

    An initialized instance.

Tag state methods

  • Retrieves whether the union’s current tag state has value “malformed_path”.

    Note

    Call this method and ensure it returns true before accessing the malformedPath property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isMalformedPath;

    Swift

    func isMalformedPath() -> Bool

    Return Value

    Whether the union’s current tag state has value “malformed_path”.

  • Retrieves whether the union’s current tag state has value “conflict”.

    Note

    Call this method and ensure it returns true before accessing the conflict property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isConflict;

    Swift

    func isConflict() -> Bool

    Return Value

    Whether the union’s current tag state has value “conflict”.

  • Retrieves whether the union’s current tag state has value “no_write_permission”.

    Declaration

    Objective-C

    - (BOOL)isNoWritePermission;

    Swift

    func isNoWritePermission() -> Bool

    Return Value

    Whether the union’s current tag state has value “no_write_permission”.

  • Retrieves whether the union’s current tag state has value “insufficient_space”.

    Declaration

    Objective-C

    - (BOOL)isInsufficientSpace;

    Swift

    func isInsufficientSpace() -> Bool

    Return Value

    Whether the union’s current tag state has value “insufficient_space”.

  • Retrieves whether the union’s current tag state has value “disallowed_name”.

    Declaration

    Objective-C

    - (BOOL)isDisallowedName;

    Swift

    func isDisallowedName() -> Bool

    Return Value

    Whether the union’s current tag state has value “disallowed_name”.

  • Retrieves whether the union’s current tag state has value “team_folder”.

    Declaration

    Objective-C

    - (BOOL)isTeamFolder;

    Swift

    func isTeamFolder() -> Bool

    Return Value

    Whether the union’s current tag state has value “team_folder”.

  • Retrieves whether the union’s current tag state has value “operation_suppressed”.

    Declaration

    Objective-C

    - (BOOL)isOperationSuppressed;

    Swift

    func isOperationSuppressed() -> Bool

    Return Value

    Whether the union’s current tag state has value “operation_suppressed”.

  • Retrieves whether the union’s current tag state has value “too_many_write_operations”.

    Declaration

    Objective-C

    - (BOOL)isTooManyWriteOperations;

    Swift

    func isTooManyWriteOperations() -> Bool

    Return Value

    Whether the union’s current tag state has value “too_many_write_operations”.

  • Retrieves whether the union’s current tag state has value “other”.

    Declaration

    Objective-C

    - (BOOL)isOther;

    Swift

    func isOther() -> Bool

    Return Value

    Whether the union’s current tag state has value “other”.

  • Retrieves string value of union’s current tag state.

    Declaration

    Objective-C

    - (nonnull NSString *)tagName;

    Swift

    func tagName() -> String

    Return Value

    A human-readable string representing the union’s current tag state.