DBFILESMetadata

Objective-C

@interface DBFILESMetadata : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESMetadata : NSObject, DBSerializable, NSCopying

The Metadata struct.

Metadata for a file or folder.

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

Instance fields

  • The last component of the path (including extension). This never contains a slash.

    Declaration

    Objective-C

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

    Swift

    var name: String { get }
  • The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.

    Declaration

    Objective-C

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

    Swift

    var pathLower: String? { get }
  • The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user’s filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won’t be returned by listFolderContinue. This field will be null if the file or folder is not mounted.

    Declaration

    Objective-C

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

    Swift

    var pathDisplay: String? { get }
  • Please use parentSharedFolderId in DBFILESFileSharingInfo or parentSharedFolderId in DBFILESFolderSharingInfo instead.

    Declaration

    Objective-C

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

    Swift

    var parentSharedFolderId: String? { get }
  • The preview URL of the file.

    Declaration

    Objective-C

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

    Swift

    var previewUrl: String? { get }

Constructors

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(nonnull NSString *)name
                               pathLower:(nullable NSString *)pathLower
                             pathDisplay:(nullable NSString *)pathDisplay
                    parentSharedFolderId:(nullable NSString *)parentSharedFolderId
                              previewUrl:(nullable NSString *)previewUrl;

    Swift

    init(name: String, pathLower: String?, pathDisplay: String?, parentSharedFolderId: String?, previewUrl: String?)

    Parameters

    name

    The last component of the path (including extension). This never contains a slash.

    pathLower

    The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.

    pathDisplay

    The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user’s filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won’t be returned by listFolderContinue. This field will be null if the file or folder is not mounted.

    parentSharedFolderId
    previewUrl

    The preview URL of the file.

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(nonnull NSString *)name;

    Swift

    init(name: String)

    Parameters

    name

    The last component of the path (including extension). This never contains a slash.

    Return Value

    An initialized instance.