- Removed ReadEntireFile - ZipWriter now writes directly to a file when possible - Added GetIndex to geometry - Moved Usd and Obj generators to different files - Removed unused procedures - Deduplicated obj generators - Updated tests for ZipWriter
29 lines
676 B
C++
29 lines
676 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_centralDirs;
|
|
int m_numFiles = 0;
|
|
FILE *m_file;
|
|
|
|
public:
|
|
ZipWriter(const std::filesystem::path& filePath);
|
|
|
|
void AddFile(const FileDescription& description, const void* buffer);
|
|
void AddFile(const std::filesystem::path& fileName, const char* inArchiveName);
|
|
void Close();
|
|
};
|
|
} |