FilesDownloader Class Reference
Inherits from | NSObject |
Conforms to | SingleFileDownloaderDelegate |
Declared in | FilesDownloader.h |
Overview
@class FilesDownloader Simple files downloader. Uses multiple SingleFileDownloader’s for size checking before & downloading.
Tasks
-
sourcePath
Path from which to download file, without filename. I.e. @“http://foo.com/files/”
property -
delegate
Delegate for download status callbacks.
property -
+ downloaderWithFiles:withSourcePath:
Creates FilesDownloader with given source path & filenames.
-
– initWithFiles:withSourcePath:
Inits FilesDownloader with given source path & filenames.
-
– start
Starts downloading.
-
– cancel
Cancels downloading.
-
– destinationPathForFileWithName:
Returns destination path which aFilename should be downloaded to. Doesn’t check does aFilename exist in _filenames array.
-
– totalPercentsDone
Returns download progress completion in percents.
-
– totalContentDownloaded
Returns total bytes count downloaded.
-
– totalContentLength
Returns total size for all content in bytes.
Properties
Class Methods
downloaderWithFiles:withSourcePath:
Creates FilesDownloader with given source path & filenames.
+ (id)downloaderWithFiles:(NSArray *)files withSourcePath:(NSString *)aSourcePath
Parameters
- files
Array of NSStrings of filenames. Each string is subPath that will be added to aSourcePath to determine full URL for single file. I.e. @“foo/bar/file.txt”
- aSourcePath
- path to download from (shared part for all files) I.e. @“http://foo.com/files/”
Declared In
FilesDownloader.h
Instance Methods
destinationPathForFileWithName:
Returns destination path which aFilename should be downloaded to. Doesn’t check does aFilename exist in _filenames array.
- (NSString *)destinationPathForFileWithName:(NSString *)aFilename
Declared In
FilesDownloader.h
initWithFiles:withSourcePath:
Inits FilesDownloader with given source path & filenames.
- (id)initWithFiles:(NSArray *)files withSourcePath:(NSString *)aSourcePath
Parameters
- files
Array of NSStrings of filenames. Each string is subPath that will be added to aSourcePath to determine full URL for single file. I.e. @“foo/bar/file.txt”
- aSourcePath
- path to download from (shared part for all files) I.e. @“http://foo.com/files/”
Declared In
FilesDownloader.h
totalContentDownloaded
Returns total bytes count downloaded.
- (int)totalContentDownloaded
Declared In
FilesDownloader.h