AliyunpanDownloader
public class AliyunpanDownloader : NSObject
下载器
-
最大并发数,默认为10
Declaration
Swift
public var maxConcurrentOperationCount: Int { get set } -
当前下载任务
Declaration
Swift
public private(set) var tasks: DownloadTasks { get } -
添加代理
Declaration
Swift
public func addDelegate(_ delegate: AliyunpanDownloadDelegate) -
开启网速监听
Declaration
Swift
public func enableNetworkSpeedMonitor() -
下载文件
Declaration
Swift
@discardableResult public func download(file: AliyunpanFile, to destination: URL) -> AliyunpanDownloadTaskParameters
file目标文件
destination目标目录
Return Value
DownloadTask
-
暂停下载
Declaration
Swift
public func pause(_ task: AliyunpanDownloadTask)Parameters
task目标任务
-
恢复下载
Declaration
Swift
public func resume(_ task: AliyunpanDownloadTask)Parameters
task目标任务
-
取消下载,会清空已下载内容
Declaration
Swift
public func cancel(_ task: AliyunpanDownloadTask)Parameters
task目标任务