MeshLib C++ Docs
Loading...
Searching...
No Matches
MRZip.h File Reference
#include "MRMeshFwd.h"
#include "MRProgressCallback.h"
#include "MRExpected.h"
#include <filesystem>
#include <functional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  MR::CompressZipSettings

Namespaces

namespace  MR
 Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

Typedefs

using MR::ZipFileCallback = std::function<Expected<void>( const std::string& path, std::vector<char>&& data )>

Functions

Expected< void > MR::decompressZip (const std::filesystem::path &zipFile, const std::filesystem::path &targetFolder, const char *password=nullptr)
 decompresses given zip-file into given folder
Expected< void > MR::decompressZip (std::istream &zipStream, const std::filesystem::path &targetFolder, const char *password=nullptr)
 decompresses given binary stream (containing the data of a zip file only) into given folder
Expected< void > MR::decompressZip (const std::filesystem::path &zipFile, const ZipFileCallback &callback, const char *password=nullptr)
 decompresses given zip-file and passes every file from it to the callback without saving anything on disk; folder entries are skipped
Expected< void > MR::decompressZip (std::istream &zipStream, const ZipFileCallback &callback, const char *password=nullptr)
 decompresses given binary stream (containing the data of a zip file only) and passes every file from it to the callback without saving anything on disk; folder entries are skipped
Expected< void > MR::compressZip (const std::filesystem::path &zipFile, const std::filesystem::path &sourceFolder, const CompressZipSettings &settings={})
 compresses given folder in given zip-file
Expected< void > MR::compressZip (const std::filesystem::path &zipFile, const std::filesystem::path &sourceFolder, const std::vector< std::filesystem::path > &excludeFiles, const char *password=nullptr, ProgressCallback cb={})
 compresses given folder in given zip-file