Metadata

open class Metadata : Content.Metadata
extension File.Metadata: CustomStringConvertible

A pCloud file.

  • The file category.

    Declaration

    Swift

    public let media: Media
  • The size of the file in bytes.

    Declaration

    Swift

    public let size: UInt64
  • The MIME type of this file.

    Declaration

    Swift

    public let contentType: String
  • A number uniquely identifying the contents of this file.

    Declaration

    Swift

    public let hash: UInt64
  • The file type.

    Declaration

    Swift

    public let icon: Media.Icon
  • true if the user accessing this file is its owner, false otherwise.

    Declaration

    Swift

    public let isOwnedByUser: Bool
  • true if a thumbnail can be generated for this file, false otherwise.

    Declaration

    Swift

    public let hasThumbnail: Bool
  • Initializes a file with all fields of this class.

    Declaration

    Swift

    public init(id: UInt64,
                name: String,
                parentFolderId: UInt64,
                createdTime: UInt32,
                modifiedTime: UInt32,
                isShared: Bool,
                icon: Media.Icon,
                media: Media,
                size: UInt64,
                contentType: String,
                hash: UInt64,
                isOwnedByUser: Bool,
                hasThumbnail: Bool)
  • true if this file’s media is Media.uncategorized, false otherwise.

    Declaration

    Swift

    open var isUncategorized: Bool { get }
  • true if this file’s media is Media.audio, false otherwise.

    Declaration

    Swift

    open var isAudio: Bool { get }
  • true if this file’s media is Media.image, false otherwise.

    Declaration

    Swift

    open var isImage: Bool { get }
  • true if this file’s media is Media.video, false otherwise.

    Declaration

    Swift

    open var isVideo: Bool { get }
  • true if this file’s media is Media.document, false otherwise.

    Declaration

    Swift

    open var isDocument: Bool { get }
  • true if this file’s media is Media.archive, false otherwise.

    Declaration

    Swift

    open var isArchive: Bool { get }
  • The audio metadata of this file. Non-nil only when this file’s media is Media.audio.

    Declaration

    Swift

    open var audioMetadata: File.Media.AudioMetadata? { get }
  • The image metadata of this file. Non-nil only when this file’s media is image.

    Declaration

    Swift

    open var imageMetadata: File.Media.ImageMetadata? { get }
  • The video metadata of this file. Non-nil only when this file’s media is video.

    Declaration

    Swift

    open var videoMetadata: File.Media.VideoMetadata? { get }
  • Declaration

    Swift

    open var description: String { get }