DownloadFile
public struct DownloadFile : Codable, Equatable, TDFunction
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
-
Undocumented
Declaration
Swift
public typealias Result = File
-
Identifier of the file to download
Declaration
Swift
public let fileId: Int32
-
Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first
Declaration
Swift
public let priority: Int32
-
The starting position from which the file should be downloaded
Declaration
Swift
public let offset: Int32
-
Number of bytes which should be downloaded starting from the “offset” position before the download will be automatically cancelled; use 0 to download without a limit
Declaration
Swift
public let limit: Int32
-
If false, this request returns file state just after the download has been started. If true, this request returns file state only after -the download has succeeded, has failed, has been cancelled or a new downloadFile request with different offset/limit parameters was sent
Declaration
Swift
public let synchronous: Bool
-
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
Declaration
Swift
public init(fileId: Int32, priority: Int32, offset: Int32, limit: Int32, synchronous: Bool)
Parameters
fileId
Identifier of the file to download
priority
Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first
offset
The starting position from which the file should be downloaded
limit
Number of bytes which should be downloaded starting from the “offset” position before the download will be automatically cancelled; use 0 to download without a limit
synchronous
If false, this request returns file state just after the download has been started. If true, this request returns file state only after -the download has succeeded, has failed, has been cancelled or a new downloadFile request with different offset/limit parameters was sent