| 361 | } |
| 362 | |
| 363 | HttpRequest * HttpRequest::GetFile(std::vector<string> const & urls, string const & filePath, int64_t fileSize, |
| 364 | Callback && onFinish, Callback && onProgress, int64_t chunkSize, |
| 365 | bool doCleanOnCancel) |
| 366 | { |
| 367 | try |
| 368 | { |
| 369 | return new FileHttpRequest(urls, filePath, fileSize, std::move(onFinish), std::move(onProgress), chunkSize, |
| 370 | doCleanOnCancel); |
| 371 | } |
| 372 | catch (FileWriter::Exception const & e) |
| 373 | { |
| 374 | // Can't create or open file for writing. |
| 375 | LOG(LWARNING, ("Can't create file", filePath, "with size", fileSize, e.Msg())); |
| 376 | } |
| 377 | return nullptr; |
| 378 | } |
| 379 | } // namespace downloader |
no outgoing calls
no test coverage detected