DBFILESFileMetadata

@interface DBFILESFileMetadata : DBFILESMetadata <DBSerializable, NSCopying>

The FileMetadata struct.

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

  • id_

    A unique identifier for the file.

    Declaration

    Objective-C

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

    Swift

    var id_: String { get }
  • For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.

    Declaration

    Objective-C

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

    Swift

    var clientModified: Date { get }
  • The last time the file was modified on Dropbox.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDate *_Nonnull serverModified;

    Swift

    var serverModified: Date { get }
  • rev

    A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.

    Declaration

    Objective-C

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

    Swift

    var rev: String { get }
  • The file size in bytes.

    Declaration

    Objective-C

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

    Swift

    var size: NSNumber { get }
  • Additional information if the file is a photo or video.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) DBFILESMediaInfo *mediaInfo;

    Swift

    var mediaInfo: DBFILESMediaInfo? { get }
  • Set if this file is a symlink.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) DBFILESSymlinkInfo *symlinkInfo;

    Swift

    var symlinkInfo: DBFILESSymlinkInfo? { get }
  • Set if this file is contained in a shared folder.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) DBFILESFileSharingInfo *sharingInfo;

    Swift

    var sharingInfo: DBFILESFileSharingInfo? { get }
  • Additional information if the file has custom properties with the property template specified.

    Declaration

    Objective-C

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

    Swift

    var propertyGroups: [DBFILEPROPERTIESPropertyGroup]? { get }
  • This flag will only be present if include_has_explicit_shared_members is true in listFolder or getMetadata. If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSNumber *hasExplicitSharedMembers;

    Swift

    var hasExplicitSharedMembers: NSNumber? { get }
  • A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash /developers/reference/content-hash page.

    Declaration

    Objective-C

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

    Swift

    var contentHash: String? { get }
  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)
                initWithName:(nonnull NSString *)name
                         id_:(nonnull NSString *)id_
              clientModified:(nonnull NSDate *)clientModified
              serverModified:(nonnull NSDate *)serverModified
                         rev:(nonnull NSString *)rev
                        size:(nonnull NSNumber *)size
                   pathLower:(nullable NSString *)pathLower
                 pathDisplay:(nullable NSString *)pathDisplay
        parentSharedFolderId:(nullable NSString *)parentSharedFolderId
                   mediaInfo:(nullable DBFILESMediaInfo *)mediaInfo
                 symlinkInfo:(nullable DBFILESSymlinkInfo *)symlinkInfo
                 sharingInfo:(nullable DBFILESFileSharingInfo *)sharingInfo
              propertyGroups:(nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)
                                 propertyGroups
    hasExplicitSharedMembers:(nullable NSNumber *)hasExplicitSharedMembers
                 contentHash:(nullable NSString *)contentHash;

    Swift

    init(name: String, id_: String, clientModified: Date, serverModified: Date, rev: String, size: NSNumber, pathLower: String?, pathDisplay: String?, parentSharedFolderId: String?, mediaInfo: DBFILESMediaInfo?, symlinkInfo: DBFILESSymlinkInfo?, sharingInfo: DBFILESFileSharingInfo?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, hasExplicitSharedMembers: NSNumber?, contentHash: String?)

    Parameters

    name

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

    id_

    A unique identifier for the file.

    clientModified

    For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.

    serverModified

    The last time the file was modified on Dropbox.

    rev

    A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.

    size

    The file size in bytes.

    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

    Please use parentSharedFolderId in DBFILESFileSharingInfo or parentSharedFolderId in DBFILESFolderSharingInfo instead.

    mediaInfo

    Additional information if the file is a photo or video.

    symlinkInfo

    Set if this file is a symlink.

    sharingInfo

    Set if this file is contained in a shared folder.

    propertyGroups

    Additional information if the file has custom properties with the property template specified.

    hasExplicitSharedMembers

    This flag will only be present if include_has_explicit_shared_members is true in listFolder or getMetadata. If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.

    contentHash

    A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash /developers/reference/content-hash page.

    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
                                     id_:(nonnull NSString *)id_
                          clientModified:(nonnull NSDate *)clientModified
                          serverModified:(nonnull NSDate *)serverModified
                                     rev:(nonnull NSString *)rev
                                    size:(nonnull NSNumber *)size;

    Swift

    init(name: String, id_: String, clientModified: Date, serverModified: Date, rev: String, size: NSNumber)

    Parameters

    name

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

    id_

    A unique identifier for the file.

    clientModified

    For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.

    serverModified

    The last time the file was modified on Dropbox.

    rev

    A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.

    size

    The file size in bytes.

    Return Value

    An initialized instance.