| 1 | // |
|---|---|
| 2 | // Replace.cpp |
| 3 | // |
| 4 | // Library: Zip |
| 5 | // Package: Manipulation |
| 6 | // Module: Replace |
| 7 | // |
| 8 | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. |
| 9 | // and Contributors. |
| 10 | // |
| 11 | // SPDX-License-Identifier: BSL-1.0 |
| 12 | // |
| 13 | |
| 14 | |
| 15 | #include "Poco/Zip/Replace.h" |
| 16 | #include "Poco/Zip/Compress.h" |
| 17 | |
| 18 | |
| 19 | namespace Poco { |
| 20 | namespace Zip { |
| 21 | |
| 22 | |
| 23 | Replace::Replace(const ZipLocalFileHeader& hdr, const std::string& localPath): |
| 24 | _del(hdr), |
| 25 | _add(hdr.getFileName(), localPath, hdr.getCompressionMethod(), hdr.getCompressionLevel()) |
| 26 | { |
| 27 | } |
| 28 | |
| 29 | |
| 30 | void Replace::execute(Compress& c, std::istream& input) |
| 31 | { |
| 32 | _del.execute(c, input); |
| 33 | _add.execute(c, input); |
| 34 | } |
| 35 | |
| 36 | |
| 37 | } } // namespace Poco::Zip |
| 38 |