Files
OpenVulkano/openVulkanoCpp/IO/Archive/ZipWriter.hpp
2024-11-20 19:36:29 +02:00

29 lines
718 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <string>
#include <vector>
#include <filesystem>
#include "IO/FileDescription.hpp"
namespace OpenVulkano
{
class ZipWriter
{
std::vector<uint8_t> m_headers;
std::vector<uint8_t> m_centralDirs;
int m_numFiles = 0;
public:
void AddFile(const FileDescription& description, const void* buffer);
void AddFile(const std::filesystem::path& fileName, const char* inArchiveName);
bool Write(const std::filesystem::path& archivePath);
std::vector<uint8_t> GetMemory();
};
}