diff --git a/AFNetworking/AFHTTPRequestOperation.h b/AFNetworking/AFHTTPRequestOperation.h index bda2d17..891cd0f 100644 --- a/AFNetworking/AFHTTPRequestOperation.h +++ b/AFNetworking/AFHTTPRequestOperation.h @@ -28,8 +28,6 @@ */ extern NSSet * AFContentTypesFromHTTPHeader(NSString *string); -extern NSString * AFCreateIncompleteDownloadDirectoryPath(void); - /** `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. */ @@ -44,30 +42,6 @@ extern NSString * AFCreateIncompleteDownloadDirectoryPath(void); */ @property (readonly, nonatomic, retain) NSHTTPURLResponse *response; -/** - Set a target file for the response, will stream directly into this destination. - Defaults to nil, which will use a memory stream. Will create a new outputStream on change. - - Note: Changing this while the request is not in ready state will be ignored. - */ -@property (nonatomic, copy) NSString *responseFilePath; - - -/** - Expected total length. This is different than expectedContentLength if the file is resumed. - On regular requests, this is equal to self.response.expectedContentLength unless we resume a request. - - Note: this can also be -1 if the file size is not sent (*) - */ -@property (assign, readonly) long long totalContentLength; - -/** - Indicator for the file offset on partial/resumed downloads. - This is greater than zero if the file download is resumed. - */ -@property (assign, readonly) long long offsetContentLength; - - ///---------------------------------------------------------- /// @name Managing And Checking For Acceptable HTTP Responses ///---------------------------------------------------------- diff --git a/AFNetworking/AFHTTPRequestOperation.m b/AFNetworking/AFHTTPRequestOperation.m index 5fca1eb..d4ef94e 100644 --- a/AFNetworking/AFHTTPRequestOperation.m +++ b/AFNetworking/AFHTTPRequestOperation.m @@ -23,8 +23,6 @@ #import "AFHTTPRequestOperation.h" #import -NSString * const kAFNetworkingIncompleteDownloadDirectoryName = @"Incomplete"; - NSSet * AFContentTypesFromHTTPHeader(NSString *string) { static NSCharacterSet *_skippedCharacterSet = nil; static dispatch_once_t onceToken; @@ -91,24 +89,6 @@ static NSString * AFStringFromIndexSet(NSIndexSet *indexSet) { return string; } -NSString * AFCreateIncompleteDownloadDirectoryPath(void) { - static NSString *incompleteDownloadPath; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - NSString *tempDirectory = NSTemporaryDirectory(); - incompleteDownloadPath = [[tempDirectory stringByAppendingPathComponent:kAFNetworkingIncompleteDownloadDirectoryName] retain]; - - NSError *error = nil; - NSFileManager *fileMan = [[NSFileManager alloc] init]; - if(![fileMan createDirectoryAtPath:incompleteDownloadPath withIntermediateDirectories:YES attributes:nil error:&error]) { - NSLog(@"Failed to create incomplete downloads directory at %@", incompleteDownloadPath); - } - [fileMan release]; - }); - - return incompleteDownloadPath; -} - #pragma mark - @interface AFHTTPRequestOperation () @@ -121,7 +101,6 @@ NSString * AFCreateIncompleteDownloadDirectoryPath(void) { @implementation AFHTTPRequestOperation @synthesize HTTPError = _HTTPError; -@synthesize responseFilePath = _responseFilePath; @synthesize successCallbackQueue = _successCallbackQueue; @synthesize failureCallbackQueue = _failureCallbackQueue; @synthesize totalContentLength = _totalContentLength; @@ -247,19 +226,6 @@ NSString * AFCreateIncompleteDownloadDirectoryPath(void) { }; } -- (void)setResponseFilePath:(NSString *)responseFilePath { - if ([self isReady] && responseFilePath != _responseFilePath) { - [_responseFilePath release]; - _responseFilePath = [responseFilePath retain]; - - if (responseFilePath) { - self.outputStream = [NSOutputStream outputStreamToFileAtPath:responseFilePath append:NO]; - }else { - self.outputStream = [NSOutputStream outputStreamToMemory]; - } - } -} - #pragma mark - AFHTTPRequestOperation static id AFStaticClassValueImplementation(id self, SEL _cmd) {