Classes
The following classes are available globally.
-
DMSwift provides a simple and efficient way to download files. It can simultaneously download a large number of files, monitors the progress of downloading, concurrently post-process downloaded files, supports logging, has a flexible configuration and easy to use API.
See moreDeclaration
Swift
public class DMSwift
-
Custom default
See moreOperation
class that used to useOperationState
enum.Declaration
Swift
open class DefaultOperation : Operation
-
The operation responsible for downloading the file.
Initiates with
See moreURLSessionTaskType
as downloadType. It has two options for downloading a file, viaURLSessionDownloadTask
orURLSessionDataTask
. If downloadType is equal to downloadTask, then downloading will be implemented throughURLSessionDownloadTask
, otherwise throughURLSessionDataTask
. In terms of performance, both options work the same way. At the moment there is not much difference, however, when downloading viaURLSessionDownloadTask
, if the response does not contain theContent-Length
header, then the file size in progress will be empty, whileURLSessionDataTask
always has the file size. If you need progress according to the file size and response header doesn’t containContent-Length
, then useURLSessionDataTask
, otherwise, try to always useURLSessionDownloadTask
. In the future, more features will probably be added for each type of download. For example, support for resuming download or the ability to download in the background.Declaration
Swift
class DownloadOperation : DefaultOperation
-
OperationQueue class, which is responsible for managing all download operations.
See moreDeclaration
Swift
class DownloadQueue : OperationQueue
-
Undocumented
See moreDeclaration
Swift
class DownloadTask : NSObject, DownloadableTask
-
A thread-safe array.
See moreDeclaration
Swift
class SynchronizedArray<Element>
-
Undocumented
See moreDeclaration
Swift
class SynchronizedDictionary<KeyType, ValueType> where KeyType : Hashable
-
Group of post-process operations.
Runs several post-processings on one file in its queue (not in parallel).
See moreDeclaration
Swift
class GroupPostProcessingOperation : DefaultOperation
-
OperationQueue class, which is responsible for managing all post-processing operations.
See moreDeclaration
Swift
class PostProcessQueue : OperationQueue
-
Post-processing operation.
See moreDeclaration
Swift
public class PostProcessingOperation : DefaultOperation