DBSHARINGFileLinkMetadata

Objective-C

@interface DBSHARINGFileLinkMetadata
    : DBSHARINGSharedLinkMetadata <DBSerializable, NSCopying>

Swift

class DBSHARINGFileLinkMetadata : DBSHARINGSharedLinkMetadata, DBSerializable, NSCopying

The FileLinkMetadata struct.

The metadata of a file shared link.

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 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 }

Constructors

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

    Declaration

    Objective-C

    - (nonnull instancetype)
                 initWithUrl:(nonnull NSString *)url
                        name:(nonnull NSString *)name
             linkPermissions:(nonnull DBSHARINGLinkPermissions *)linkPermissions
              clientModified:(nonnull NSDate *)clientModified
              serverModified:(nonnull NSDate *)serverModified
                         rev:(nonnull NSString *)rev
                        size:(nonnull NSNumber *)size
                         id_:(nullable NSString *)id_
                     expires:(nullable NSDate *)expires
                   pathLower:(nullable NSString *)pathLower
              teamMemberInfo:(nullable DBSHARINGTeamMemberInfo *)teamMemberInfo
        contentOwnerTeamInfo:(nullable DBUSERSTeam *)contentOwnerTeamInfo;

    Swift

    init(url: String, name: String, linkPermissions: DBSHARINGLinkPermissions, clientModified: Date, serverModified: Date, rev: String, size: NSNumber, id_: String?, expires: Date?, pathLower: String?, teamMemberInfo: DBSHARINGTeamMemberInfo?, contentOwnerTeamInfo: DBUSERSTeam?)

    Parameters

    url

    URL of the shared link.

    name

    The linked file name (including extension). This never contains a slash.

    linkPermissions

    The link’s access permissions.

    clientModified

    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.

    id_

    A unique identifier for the linked file.

    expires

    Expiration time, if set. By default the link won’t expire.

    pathLower

    The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user’s dropbox.

    teamMemberInfo

    The team membership information of the link’s owner. This field will only be present if the link’s owner is a team member.

    contentOwnerTeamInfo

    The team information of the content’s owner. This field will only be present if the content’s owner is a team member and the content’s owner team is different from the link’s owner team.

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUrl:(nonnull NSString *)url
                                   name:(nonnull NSString *)name
                        linkPermissions:
                            (nonnull DBSHARINGLinkPermissions *)linkPermissions
                         clientModified:(nonnull NSDate *)clientModified
                         serverModified:(nonnull NSDate *)serverModified
                                    rev:(nonnull NSString *)rev
                                   size:(nonnull NSNumber *)size;

    Swift

    init(url: String, name: String, linkPermissions: DBSHARINGLinkPermissions, clientModified: Date, serverModified: Date, rev: String, size: NSNumber)

    Parameters

    url

    URL of the shared link.

    name

    The linked file name (including extension). This never contains a slash.

    linkPermissions

    The link’s access permissions.

    clientModified

    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.