DMSwiftAPI

public protocol DMSwiftAPI : DMSwift

Undocumented

  • Adds 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.

  • Adds 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.

  • Adds 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.

  • Adds 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 method

    Updates postProcesses

    Declaration

    Swift

    func update(postProcesses: [PostProcessing])

    Parameters

    postProcesses

    List of all available post-preccesses.

  • cancel() Extension method

    Cancels all tasks.

    Declaration

    Swift

    func cancel()
  • cancel(_:) Extension method

    Cancels the download for a specific task.

    Declaration

    Swift

    func cancel(_ url: URL)

    Parameters

    url

    A started download url.

  • removeFilesFromDirectory() Extension method

    Deletes files at the specified directory.

    Declaration

    Swift

    func removeFilesFromDirectory()