Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
ArchiveWriter.h
1#pragma once
2
3#include <vector>
4
5#include "ArchiveIO.h"
6#include "FileInBuffer.h"
7
9{
10 void* pmz_zip_writer_instance_ = nullptr;
11 void Create() override;
12 mz_zip_file fileInfo_ = {};
13
14 int32_t CloseInternal();
15 void DeleteInternal();
16
17public:
18 explicit ArchiveWriter(const std::filesystem::path& archivePath);
20 ~ArchiveWriter() override;
21
22 int32_t Close() override;
23 void Delete() override;
24 int32_t CloseUnsafe();
25 void DeleteUnsafe();
26
27 int Open() override;
28 void InitFileInfo();
29 int32_t AddFileInArchive(const FileBuffer& FileBufferToAdd);
30 int32_t AddFileInArchive(const std::filesystem::path& FileToAdd);
31 int32_t AddPathInArchive(const std::filesystem::path& path_to_add,
32 const std::filesystem::path& root_path);
33
34 void* InternalPointer() const override
35 {
36 return pmz_zip_writer_instance_;
37 }
38};
Definition ArchiveIO.h:50
Definition ArchiveWriter.h:9
int32_t CloseUnsafe()
Close the archive Not thread safe Meant to be used with DeleteUnsafe and both of them guarded by a si...
Definition ArchiveWriter.cpp:172
void DeleteUnsafe()
Delete the archive Not thread safe Meant to be used with CloseUnsafe and both of them guarded by a si...
Definition ArchiveWriter.cpp:189
Definition FileInBuffer.h:7