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
url
A remote location of the file.
forceDownload
Whether to force download, even if the file with the same name located in the device storage.
completion
Completion 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
urls
A list of remote locations of the files.
forceDownload
Whether to force download, even if the file with the same name located in the device storage.
completion
Completion 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
request
Request for remote file.
forceDownload
Whether to force download, even if the file with the same name located in the device storage.
completion
Completion 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
requests
Requests for remote files.
forceDownload
Whether to force download, even if the file with the same name located in the device storage.
completion
Completion 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
postProcesses
List 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
url
A started download url.
-
removeFilesFromDirectory()
Extension methodDeletes files at the specified directory.
Declaration
Swift
func removeFilesFromDirectory()