@interface RNFileCacheDownloaderTask : NSObject

- (id)initWithTask:(NSURLSessionDataTask *)task path:(NSString *)path;
- (void)download;
- (void)cancel;
- (NSString *)path;

- (void)didCompleteWithError:(NSError *)error;
- (void)didReceiveData:(NSData *)data;
- (void)didReceiveResponse:(NSURLResponse *)response 
         completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler;

+ (RNFileCacheDownloaderTask *)task:(NSUInteger)taskIdentifier;
+ (RNFileCacheDownloaderTask *)taskForURL:(NSURL *)url;
+ (NSNumber *)freeDiskSpace;

@end
