DMSwiftAPI
public protocol DMSwiftAPI : DMSwift
Undocumented
-
download(_:forceDownload:completion:)Extension methodAdds a download task to the queue.
Declaration
Swift
func download(_ url: URL, forceDownload: Bool = false, completion: ((_ fileData: DMSwiftTypealias.Download.FileData) -> Void)? = nil)Parameters
urlA remote location of the file.
forceDownloadWhether to force download, even if the file with the same name located in the device storage.
completionCompletion handler called when one of the download operations is finish in the queue.
-
download(_:forceDownload:completion:)Extension methodAdds a download tasks to the queue.
Declaration
Swift
func download(_ urls: [URL], forceDownload: Bool = false, completion: ((_ fileData: DMSwiftTypealias.Download.FileData) -> Void)? = nil)Parameters
urlsA list of remote locations of the files.
forceDownloadWhether to force download, even if the file with the same name located in the device storage.
completionCompletion handler called when one of the download operations is finish in the queue.
-
download(_:forceDownload:completion:)Extension methodAdds a download task to the queue.
Declaration
Swift
func download(_ request: URLRequest, forceDownload: Bool = false, completion: ((_ fileData: DMSwiftTypealias.Download.FileData) -> Void)? = nil)Parameters
requestRequest for remote file.
forceDownloadWhether to force download, even if the file with the same name located in the device storage.
completionCompletion handler called when one of the download operations is finish in the queue.
-
download(_:forceDownload:completion:)Extension methodAdds a download tasks to the queue.
Declaration
Swift
func download(_ requests: [URLRequest], forceDownload: Bool = false, completion: ((_ fileData: DMSwiftTypealias.Download.FileData) -> Void)? = nil)Parameters
requestsRequests for remote files.
forceDownloadWhether to force download, even if the file with the same name located in the device storage.
completionCompletion handler called when one of the download operations is finish in the queue.
-
update(postProcesses:)Extension methodUpdates postProcesses
Declaration
Swift
func update(postProcesses: [PostProcessing])Parameters
postProcessesList of all available post-preccesses.
-
cancel()Extension methodCancels all tasks.
Declaration
Swift
func cancel() -
cancel(_:)Extension methodCancels the download for a specific task.
Declaration
Swift
func cancel(_ url: URL)Parameters
urlA started download url.
-
removeFilesFromDirectory()Extension methodDeletes files at the specified directory.
Declaration
Swift
func removeFilesFromDirectory()
DMSwiftAPI Protocol Reference