关于封装zip文件的压缩与解压操作
#ifndef IMINIZIP_H
#define IMINIZIP_H
#include <string>
#include <vector>
#include <map>
class IMiniZip
{
public:
virtual ~IMiniZip() { }
public:
virtual bool CompressFile(std::string strSrcFilePath,
std::string strZipFilePath,
std::string strParentDirInZip="",
std::string strPassword = "") = 0;
virtual bool CompressFile(std::map<std::string,std::string>& SrcFilePathTable,
std::string strZipFilePath,
std::string strPassword = "") = 0;
virtual bool CompressFolder(std::string strSrcFolderPath,
std::string strZipFilePath,
std::string strPassword = "") = 0;
virtual bool UnCompress(std::string strZipFilePath,
std::string strDestDirPath,
std::string strPassword = "") = 0;
virtual bool GetFilePathInZip(std::string strZipFilePath,
std::string strFileName,
std::vector<std::string>& FilePathTable,
std::string strPassword = "",
bool bIsCaseSensitive = true) = 0;
virtual bool List(std::string strZipFilePath,
std::vector<std::string>& FileList,
std::string strPassword = "") = 0;
virtual bool IsFileInZip(std::string strZipFilePath,
std::string strFileName,
std::string strPassword = "",
bool bIsCaseSensitive = true) = 0;
virtual bool IsFileInChildZip(std::string strParentZipFilePath,
std::string strChildZipFileName,
std::string strFileName,
std::string strPassword = "",
bool bIsCaseSensitive = true) = 0;
virtual bool GetFileDataInZip(std::string strParentZipFilePath,
std::string strFileName,
std::map<std::string, std::string>& FileDataMap,
std::string strPassword = "",
bool bIsCaseSensitive = true) = 0;
virtual bool GetFileDataInChildZip(std::string strParentZipFilePath,
std::string strChildZipFileName,
std::string strFileName,
std::map<std::string, std::string>& FileDataMap,
std::string strPassword = "",
bool bIsCaseSensitive = true) = 0;
virtual std::string GetErrorMsg() = 0;
};
#endif