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

Properties

delegate

Delegate for download status callbacks.

@property (readwrite, retain) id<FilesDownloaderDelegate> delegate

Declared In

FilesDownloader.h

sourcePath

Path from which to download file, without filename. I.e. @“http://foo.com/files/”

@property (readwrite, copy) NSString *sourcePath

Declared In

FilesDownloader.h

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

cancel

Cancels downloading.

- (void)cancel

Declared In

FilesDownloader.h

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

start

Starts downloading.

- (void)start

Declared In

FilesDownloader.h

totalContentDownloaded

Returns total bytes count downloaded.

- (int)totalContentDownloaded

Declared In

FilesDownloader.h

totalContentLength

Returns total size for all content in bytes.

- (int)totalContentLength

Declared In

FilesDownloader.h

totalPercentsDone

Returns download progress completion in percents.

- (float)totalPercentsDone

Declared In

FilesDownloader.h