Horizon
Loading...
Searching...
No Matches
tree_writer_archive.hpp
1#pragma once
2#include "tree_writer.hpp"
3#include <sstream>
4#include <set>
5#include <optional>
6#include <archive.h>
7
8namespace horizon {
10public:
11 enum class Type { TGZ, ZIP };
12
13 TreeWriterArchive(const fs::path &filename, Type type);
14
16
17private:
18 std::ostream &create_file_internal(const fs::path &path) override;
19 void close_file() override;
20 void mkdir_recursive(const fs::path &path);
21
22 const Type type;
23 std::optional<std::ostringstream> ostream;
24 std::set<fs::path> created_files;
25 std::set<fs::path> created_directories;
26
27 archive *ar = nullptr;
28 archive_entry *ar_entry = nullptr;
29};
30} // namespace horizon
Definition tree_writer_archive.hpp:9
Definition tree_writer.hpp:7