MeshLib C++ Docs
Loading...
Searching...
No Matches
MRZip.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
5#include "MRExpected.h"
6#include <filesystem>
7#include <vector>
8
9namespace MR
10{
11
15
20MRMESH_API Expected<void> decompressZip( const std::filesystem::path& zipFile, const std::filesystem::path& targetFolder,
21 const char * password = nullptr );
22
27MRMESH_API Expected<void> decompressZip( std::istream& zipStream, const std::filesystem::path& targetFolder, const char * password = nullptr );
28
30{
32 std::vector<std::filesystem::path> excludeFiles;
33
37
39 std::string password;
40
43};
44
48MRMESH_API Expected<void> compressZip( const std::filesystem::path& zipFile, const std::filesystem::path& sourceFolder,
49 const CompressZipSettings& settings = {} );
50
57[[deprecated( "Use compressZip( zipFile, sourceFolder, settings )" )]]
58MRMESH_API Expected<void> compressZip( const std::filesystem::path& zipFile, const std::filesystem::path& sourceFolder,
59 const std::vector<std::filesystem::path>& excludeFiles, const char * password = nullptr, ProgressCallback cb = {} );
60
62
63}
#define MRMESH_API
Definition MRMeshFwd.h:80
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:753
tl::expected< T, E > Expected
Definition MRExpected.h:31
Expected< void > decompressZip(const std::filesystem::path &zipFile, const std::filesystem::path &targetFolder, const char *password=nullptr)
decompresses given zip-file into given folder
Expected< void > compressZip(const std::filesystem::path &zipFile, const std::filesystem::path &sourceFolder, const CompressZipSettings &settings={})
compresses given folder in given zip-file
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRZip.h:30
std::string password
if password is given then the archive will be encrypted
Definition MRZip.h:39
std::vector< std::filesystem::path > excludeFiles
files that should not be included to result zip
Definition MRZip.h:32
int compressionLevel
Definition MRZip.h:36
ProgressCallback cb
an option to get progress notifications and cancel the operation
Definition MRZip.h:42