1 | // |
2 | // Add.cpp |
3 | // |
4 | // Library: Zip |
5 | // Package: Manipulation |
6 | // Module: Add |
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/Add.h" |
16 | #include "Poco/Zip/Compress.h" |
17 | |
18 | |
19 | namespace Poco { |
20 | namespace Zip { |
21 | |
22 | |
23 | Add::Add(const std::string& zipPath, const std::string& localPath, ZipCommon::CompressionMethod cm, ZipCommon::CompressionLevel cl): |
24 | _zipPath(zipPath), |
25 | _localPath(localPath), |
26 | _cm(cm), |
27 | _cl(cl) |
28 | { |
29 | } |
30 | |
31 | |
32 | void Add::execute(Compress& c, std::istream& /*input*/) |
33 | { |
34 | c.addFile(Poco::Path(_localPath), Poco::Path(_zipPath), _cm, _cl); |
35 | } |
36 | |
37 | |
38 | } } // namespace Poco::Zip |
39 | |