DBSHARINGSharedFileMetadata
Objective-C
@interface DBSHARINGSharedFileMetadata : NSObject <DBSerializable, NSCopying>
Swift
class DBSHARINGSharedFileMetadata : NSObject, DBSerializable, NSCopying
The SharedFileMetadata
struct.
Properties of the shared file.
This class implements the DBSerializable
protocol (serialize and
deserialize instance methods), which is required for all Obj-C SDK API route
objects.
-
The current user’s access level for this shared file.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) DBSHARINGAccessLevel *accessType;
Swift
var accessType: DBSHARINGAccessLevel? { get }
-
The ID of the file.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull id_;
Swift
var id_: String { get }
-
The expected metadata of the link associated for the file when it is first shared. Absent if the link already exists. This is for an unreleased feature so it may not be returned yet.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) DBSHARINGExpectedSharedContentLinkMetadata *expectedLinkMetadata;
Swift
var expectedLinkMetadata: DBSHARINGExpectedSharedContentLinkMetadata? { get }
-
The metadata of the link associated for the file. This is for an unreleased feature so it may not be returned yet.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) DBSHARINGSharedContentLinkMetadata *linkMetadata;
Swift
var linkMetadata: DBSHARINGSharedContentLinkMetadata? { get }
-
The name of this file.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull name;
Swift
var name: String { get }
-
The display names of the users that own the file. If the file is part of a team folder, the display names of the team admins are also included. Absent if the owner display names cannot be fetched.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<NSString *> *ownerDisplayNames;
Swift
var ownerDisplayNames: [String]? { get }
-
The team that owns the file. This field is not present if the file is not owned by a team.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) DBUSERSTeam *ownerTeam;
Swift
var ownerTeam: DBUSERSTeam? { get }
-
The ID of the parent shared folder. This field is present only if the file is contained within a shared folder.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *parentSharedFolderId;
Swift
var parentSharedFolderId: 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. Absent for unmounted files.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *pathDisplay;
Swift
var pathDisplay: String? { get }
-
The lower-case full path of this file. Absent for unmounted files.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *pathLower;
Swift
var pathLower: String? { get }
-
The sharing permissions that requesting user has on this file. This corresponds to the entries given in
actions
inDBSHARINGGetFileMetadataBatchArg
oractions
inDBSHARINGGetFileMetadataArg
.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<DBSHARINGFilePermission *> *permissions;
Swift
var permissions: [DBSHARINGFilePermission]? { get }
-
Policies governing this shared file.
Declaration
Objective-C
@property (nonatomic, readonly) DBSHARINGFolderPolicy *_Nonnull policy;
Swift
var policy: DBSHARINGFolderPolicy { get }
-
URL for displaying a web preview of the shared file.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull previewUrl;
Swift
var previewUrl: String { get }
-
Timestamp indicating when the current user was invited to this shared file. If the user was not invited to the shared file, the timestamp will indicate when the user was invited to the parent shared folder. This value may be absent.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDate *timeInvited;
Swift
var timeInvited: Date? { get }
-
-initWithId_:
name: policy: previewUrl: accessType: expectedLinkMetadata: linkMetadata: ownerDisplayNames: ownerTeam: parentSharedFolderId: pathDisplay: pathLower: permissions: timeInvited: Full constructor for the struct (exposes all instance variables).
Declaration
Objective-C
- (nonnull instancetype) initWithId_:(nonnull NSString *)id_ name:(nonnull NSString *)name policy:(nonnull DBSHARINGFolderPolicy *)policy previewUrl:(nonnull NSString *)previewUrl accessType:(nullable DBSHARINGAccessLevel *)accessType expectedLinkMetadata:(nullable DBSHARINGExpectedSharedContentLinkMetadata *) expectedLinkMetadata linkMetadata: (nullable DBSHARINGSharedContentLinkMetadata *)linkMetadata ownerDisplayNames:(nullable NSArray<NSString *> *)ownerDisplayNames ownerTeam:(nullable DBUSERSTeam *)ownerTeam parentSharedFolderId:(nullable NSString *)parentSharedFolderId pathDisplay:(nullable NSString *)pathDisplay pathLower:(nullable NSString *)pathLower permissions: (nullable NSArray<DBSHARINGFilePermission *> *)permissions timeInvited:(nullable NSDate *)timeInvited;
Swift
init(id_: String, name: String, policy: DBSHARINGFolderPolicy, previewUrl: String, accessType: DBSHARINGAccessLevel?, expectedLinkMetadata: DBSHARINGExpectedSharedContentLinkMetadata?, linkMetadata: DBSHARINGSharedContentLinkMetadata?, ownerDisplayNames: [String]?, ownerTeam: DBUSERSTeam?, parentSharedFolderId: String?, pathDisplay: String?, pathLower: String?, permissions: [DBSHARINGFilePermission]?, timeInvited: Date?)
Parameters
id_
The ID of the file.
name
The name of this file.
policy
Policies governing this shared file.
previewUrl
URL for displaying a web preview of the shared file.
accessType
The current user’s access level for this shared file.
expectedLinkMetadata
The expected metadata of the link associated for the file when it is first shared. Absent if the link already exists. This is for an unreleased feature so it may not be returned yet.
linkMetadata
The metadata of the link associated for the file. This is for an unreleased feature so it may not be returned yet.
ownerDisplayNames
The display names of the users that own the file. If the file is part of a team folder, the display names of the team admins are also included. Absent if the owner display names cannot be fetched.
ownerTeam
The team that owns the file. This field is not present if the file is not owned by a team.
parentSharedFolderId
The ID of the parent shared folder. This field is present only if the file is contained within a shared folder.
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. Absent for unmounted files.
pathLower
The lower-case full path of this file. Absent for unmounted files.
permissions
The sharing permissions that requesting user has on this file. This corresponds to the entries given in
actions
inDBSHARINGGetFileMetadataBatchArg
oractions
inDBSHARINGGetFileMetadataArg
.timeInvited
Timestamp indicating when the current user was invited to this shared file. If the user was not invited to the shared file, the timestamp will indicate when the user was invited to the parent shared folder. This value may be absent.
Return Value
An initialized instance.
-
Convenience constructor (exposes only non-nullable instance variables with no default value).
Declaration
Objective-C
- (nonnull instancetype)initWithId_:(nonnull NSString *)id_ name:(nonnull NSString *)name policy:(nonnull DBSHARINGFolderPolicy *)policy previewUrl:(nonnull NSString *)previewUrl;
Swift
init(id_: String, name: String, policy: DBSHARINGFolderPolicy, previewUrl: String)
Parameters
id_
The ID of the file.
name
The name of this file.
policy
Policies governing this shared file.
previewUrl
URL for displaying a web preview of the shared file.
Return Value
An initialized instance.