| 688 | } |
| 689 | |
| 690 | std::string ProjectFile::extractInputFile(const std::string& name) |
| 691 | { |
| 692 | zipios::ZipFile project(stdFile); |
| 693 | std::unique_ptr<std::istream> str(project.getInputStream(name)); |
| 694 | if (str) { |
| 695 | // write it to a tmp. file as writing to the string stream |
| 696 | // might take too long |
| 697 | Base::FileInfo fi(Base::FileInfo::getTempFileName()); |
| 698 | Base::ofstream file(fi, std::ios::out | std::ios::binary); |
| 699 | std::streambuf* buf = file.rdbuf(); |
| 700 | (*str) >> buf; |
| 701 | file.flush(); |
| 702 | file.close(); |
| 703 | return fi.filePath(); |
| 704 | } |
| 705 | |
| 706 | return {}; |
| 707 | } |
| 708 | |
| 709 | void ProjectFile::readInputFile(const std::string& name, std::ostream& str) |
| 710 | { |
nothing calls this directly
no test coverage detected