DBFILESPreviewResult

Objective-C

@interface DBFILESPreviewResult : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESPreviewResult : NSObject, DBSerializable, NSCopying

The PreviewResult 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

  • Metadata corresponding to the file received as an argument. Will be populated if the endpoint is called with a path (ReadPath).

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBFILESFileMetadata *fileMetadata;

    Swift

    var fileMetadata: DBFILESFileMetadata? { get }
  • Minimal metadata corresponding to the file received as an argument. Will be populated if the endpoint is called using a shared link (SharedLinkFileInfo).

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBFILESMinimalFileLinkMetadata *linkMetadata;

    Swift

    var linkMetadata: DBFILESMinimalFileLinkMetadata? { get }

Constructors

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

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithFileMetadata:(nullable DBFILESFileMetadata *)fileMetadata
                linkMetadata:
                    (nullable DBFILESMinimalFileLinkMetadata *)linkMetadata;

    Swift

    init(fileMetadata: DBFILESFileMetadata?, linkMetadata: DBFILESMinimalFileLinkMetadata?)

    Parameters

    fileMetadata

    Metadata corresponding to the file received as an argument. Will be populated if the endpoint is called with a path (ReadPath).

    linkMetadata

    Minimal metadata corresponding to the file received as an argument. Will be populated if the endpoint is called using a shared link (SharedLinkFileInfo).

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (nonnull instancetype)initDefault;

    Swift

    init(default: ())

    Return Value

    An initialized instance.