SLProject 4.0.000
ZipUtils Namespace Reference

ZipUtils provides compressing & decompressing files and folders. More...

Functions

static bool zip_add_dir (zipFile zfile, string dirname)
 
static bool zip_add_file (zipFile zfile, std::ifstream &fs, string filename, string zipPath="")
 
static bool zip_add_file (zipFile zfile, string filepath, string zipPath="")
 
bool unzip (string zipfile, function< bool(string path, string filename)> processFile, function< bool(const char *data, size_t len)> writeChunk, function< bool(string path)> processDir, function< int(int currentFile, int totalFiles)> progress=nullptr)
 
bool zip (string path, string zipname)
 
bool unzip (string path, string dest, bool override, function< int(int currentFile, int totalFiles)> progress)
 

Detailed Description

ZipUtils provides compressing & decompressing files and folders.

Function Documentation

◆ unzip() [1/2]

bool ZipUtils::unzip ( string  path,
string  dest,
bool  override,
function< int(int currentFile, int totalFiles)>  progress 
)

Unzips a zip file

Parameters
path???
dest???
overrideOverrides existing files on destination
progressProgress function to call for progress visualization
Returns
Returns true on success

◆ unzip() [2/2]

bool ZipUtils::unzip ( string  zipfile,
function< bool(string path, string filename)>  processFile,
function< bool(const char *data, size_t len)>  writeChunk,
function< bool(string path)>  processDir,
function< int(int currentFile, int totalFiles)>  progress = nullptr 
)
Parameters
zipfile???
processFile???
writeChunk???
processDir???
progressProgress function to call for progress visualization
Returns
???

◆ zip()

bool ZipUtils::zip ( string  path,
string  zipname 
)
Parameters
path???
zipname???
Returns
???

◆ zip_add_dir()

static bool ZipUtils::zip_add_dir ( zipFile  zfile,
string  dirname 
)
static
Parameters
zfile???
dirname???
Returns
???

◆ zip_add_file() [1/2]

static bool ZipUtils::zip_add_file ( zipFile  zfile,
std::ifstream &  fs,
string  filename,
string  zipPath = "" 
)
static
Parameters
zfile???
fs???
filename???
zipPath???
Returns
???

◆ zip_add_file() [2/2]

static bool ZipUtils::zip_add_file ( zipFile  zfile,
string  filepath,
string  zipPath = "" 
)
static
Parameters
zfile???
filepath???
zipPath???
Returns
???