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
-
sourcePathPath from which to download file, without filename. I.e. @“http://foo.com/files/”
property -
delegateDelegate for download status callbacks.
property -
+ downloaderWithFiles:withSourcePath:Creates FilesDownloader with given source path & filenames.
-
– initWithFiles:withSourcePath:Inits FilesDownloader with given source path & filenames.
-
– startStarts downloading.
-
– cancelCancels downloading.
-
– destinationPathForFileWithName:Returns destination path which aFilename should be downloaded to. Doesn’t check does aFilename exist in _filenames array.
-
– totalPercentsDoneReturns download progress completion in percents.
-
– totalContentDownloadedReturns total bytes count downloaded.
-
– totalContentLengthReturns 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 *)aSourcePathParameters
- 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.hInstance Methods
destinationPathForFileWithName:
Returns destination path which aFilename should be downloaded to. Doesn’t check does aFilename exist in _filenames array.
- (NSString *)destinationPathForFileWithName:(NSString *)aFilenameDeclared In
FilesDownloader.hinitWithFiles:withSourcePath:
Inits FilesDownloader with given source path & filenames.
- (id)initWithFiles:(NSArray *)files withSourcePath:(NSString *)aSourcePathParameters
- 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.htotalContentDownloaded
Returns total bytes count downloaded.
- (int)totalContentDownloadedDeclared In
FilesDownloader.h