DBFILESFileMetadata

Objective-C

@interface DBFILESFileMetadata : DBFILESMetadata <DBSerializable, NSCopying>

Swift

class 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.

Instance fields

  • id_

    A unique identifier for the file.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) 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 (nonatomic, readonly) NSDate *_Nonnull clientModified;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) 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 (nonatomic, copy, readonly) NSString *_Nonnull rev;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var size: NSNumber { get }
  • Additional information if the file is a photo or video. This field will not be set on entries returned by listFolder, listFolderContinue, or getThumbnailBatch, starting December 2, 2019.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var sharingInfo: DBFILESFileSharingInfo? { get }
  • If true, file can be downloaded directly; else the file must be exported.

    Declaration

    Objective-C

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

    Swift

    var isDownloadable: NSNumber { get }
  • Information about format this file can be exported to. This filed must be set if isDownloadable is set to false.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBFILESExportInfo *exportInfo;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly, 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 (nonatomic, readonly, 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 https://www.dropbox.com/developers/reference/content-hash page.

    Declaration

    Objective-C

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

    Swift

    var contentHash: String? { get }
  • If present, the metadata associated with the file’s current lock.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBFILESFileLockMetadata *fileLockInfo;

    Swift

    var fileLockInfo: DBFILESFileLockMetadata? { get }

Constructors

  • 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
                  isDownloadable:(nullable NSNumber *)isDownloadable
                      exportInfo:(nullable DBFILESExportInfo *)exportInfo
                  propertyGroups:
                      (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)
                          propertyGroups
        hasExplicitSharedMembers:(nullable NSNumber *)hasExplicitSharedMembers
                     contentHash:(nullable NSString *)contentHash
                    fileLockInfo:(nullable DBFILESFileLockMetadata *)fileLockInfo;

    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?, isDownloadable: NSNumber?, exportInfo: DBFILESExportInfo?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, hasExplicitSharedMembers: NSNumber?, contentHash: String?, fileLockInfo: DBFILESFileLockMetadata?)

    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. This field will not be set on entries returned by listFolder, listFolderContinue, or getThumbnailBatch, starting December 2, 2019.

    symlinkInfo

    Set if this file is a symlink.

    sharingInfo

    Set if this file is contained in a shared folder.

    isDownloadable

    If true, file can be downloaded directly; else the file must be exported.

    exportInfo

    Information about format this file can be exported to. This filed must be set if isDownloadable is set to false.

    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 https://www.dropbox.com/developers/reference/content-hash page.

    fileLockInfo

    If present, the metadata associated with the file’s current lock.

    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.