Reputation: 455
I know if I save resume data when my download failed, i can resume downloading later.
I wonder if the original file from server is modified before I try to resume downloading, 'initWithResumeData:delegate:path' will handle to decide to download from beginging of new file?
or should I request file information first and compare modification date myself?
(assuming a new file has same name but different attribute.)
I use bottom code.
NSData * rData = [NSData dataWithContentsOfFile:@"MY_RESUME_DATA_PATH"];
NSURLDownload * urlDownload = [[NSURLDownload alloc] initWithResumeData:rData delegate:self path:destFilePath]];
Upvotes: 2
Views: 130
Reputation: 601
Sorry if is late, but resumeData simply compare the data stored in your plist with the new request. If nothing is changed you can resume your data...
Upvotes: 0