Files
catalinvasile 56c367a3c4 Added embedded libzip
Prefixed all libzip zip_ funcs to fs_zip_ to avoid clashes and link errors due to assimp
Zip pack and zip writer work with libzip now
2024-07-16 12:57:03 +02:00

20 lines
758 B
C++

#pragma once
#include "fs/Error.h"
#include "fs/Api.h"
#include "fs/IFilesystem.h"
namespace fs
{
class ISink;
typedef tl::result<void, Error> UnzipResult;
FS_API UnzipResult unzipSource(IFilesystem& dstFilesystem, AbsPathView filePath, tl::unique_ref<IMapSource> source);
FS_API UnzipResult unzipFile(IFilesystem& dstFilesystem, AbsPathView filePath, tl::lent_ref<const IFilesystem> filesystem, AbsPathView srcFilePath);
typedef tl::result<void, Error> ZipResult;
FS_API ZipResult zipToSink(ISink& sink, tl::lent_ref<IFilesystem> filesystem, AbsPathView path, uint8_t compressionLevel);
FS_API ZipResult zipToFile(IFilesystem& dstFilesystem, AbsPathView dstFilePath, tl::lent_ref<IFilesystem> filesystem, AbsPathView path, uint8_t compressionLevel);
}