Privacy
An open-source, flexible 3D physical simulation framework
mars::smurf::Zipit Class Reference

#include <zipit.h>

Public Member Functions

 Zipit (const std::string &zipFileName)
 int zipit(string zipFileName); the constructor just initialises some internal values, i.e. More...
 
 ~Zipit ()
 
ZipitError unzipAll (const std::string &zipFilename, const std::string &directory)
 
ZipitError zipDirectory (const std::string &directory, const std::string &zipFile, bool overwrite)
 
int addToZip (const std::string &fileNameToZip, const std::string &sourceFileNameToZip)
 int addToZip(string fileNameToZip, bool zipWithFolders); and int addToZip(string fileNameToZip, bool zipWithFolders, vector<string> listOfFiles); both adding file(s) to a zipfile. More...
 
int addToZip (const std::vector< std::string > &listOfFiles, const std::vector< std::string > &sourceListOfFiles)
 
int getFromZip (const std::string &inZipFileName, const std::string &whereToStore)
 an important fearture to add: an ability to spezify an folder, where the files should be stored More...
 
int getFromZip (const std::vector< std::string > &allFileNamesToRead, const std::vector< std::string > &v_whereToStore)
 
int unpackWholeZipTo (const std::string &whereToStore)
 
int closeZipHandle ()
 
int closeUnZipHandle ()
 

Private Member Functions

int openZipHandle ()
 int openZipHandle(); int closeZipHandle(); int openUnZipHandle(); int closeUnZipHandle(); More...
 
int openUnZipHandle ()
 
void zipError (ZipitError errorNumber)
 until now, this function does nothing, but in future it should be just to generate uniformed errorMessages More...
 

Private Attributes

zipFile zipHandle
 just a few internal variables. More...
 
unzFile unZipHandle
 
std::string zipFileName
 

Detailed Description

Definition at line 66 of file zipit.h.

Constructor & Destructor Documentation

◆ Zipit()

mars::smurf::Zipit::Zipit ( const std::string &  zipFileName)

int zipit(string zipFileName); the constructor just initialises some internal values, i.e.

the name of the zipfile. it does not open an handle to the zipfile. there are spezial methods doing this.

◆ ~Zipit()

mars::smurf::Zipit::~Zipit ( )

Definition at line 51 of file zipit.cpp.

Member Function Documentation

◆ addToZip() [1/2]

int mars::smurf::Zipit::addToZip ( const std::string &  fileNameToZip,
const std::string &  sourceFileNameToZip 
)

int addToZip(string fileNameToZip, bool zipWithFolders); and int addToZip(string fileNameToZip, bool zipWithFolders, vector<string> listOfFiles); both adding file(s) to a zipfile.

◆ addToZip() [2/2]

int mars::smurf::Zipit::addToZip ( const std::vector< std::string > &  listOfFiles,
const std::vector< std::string > &  sourceListOfFiles 
)

◆ closeUnZipHandle()

int mars::smurf::Zipit::closeUnZipHandle ( )

Definition at line 85 of file zipit.cpp.

◆ closeZipHandle()

int mars::smurf::Zipit::closeZipHandle ( )

Definition at line 65 of file zipit.cpp.

◆ getFromZip() [1/2]

int mars::smurf::Zipit::getFromZip ( const std::string &  inZipFileName,
const std::string &  whereToStore 
)

an important fearture to add: an ability to spezify an folder, where the files should be stored

◆ getFromZip() [2/2]

int mars::smurf::Zipit::getFromZip ( const std::vector< std::string > &  allFileNamesToRead,
const std::vector< std::string > &  v_whereToStore 
)

◆ openUnZipHandle()

int mars::smurf::Zipit::openUnZipHandle ( )
private

Definition at line 76 of file zipit.cpp.

◆ openZipHandle()

int mars::smurf::Zipit::openZipHandle ( )
private

int openZipHandle(); int closeZipHandle(); int openUnZipHandle(); int closeUnZipHandle();

they just open or close an handle to zipfile spezified above

Definition at line 56 of file zipit.cpp.

◆ unpackWholeZipTo()

int mars::smurf::Zipit::unpackWholeZipTo ( const std::string &  whereToStore)

◆ unzipAll()

ZipitError mars::smurf::Zipit::unzipAll ( const std::string &  zipFilename,
const std::string &  directory 
)

Definition at line 348 of file zipit.cpp.

◆ zipDirectory()

ZipitError mars::smurf::Zipit::zipDirectory ( const std::string &  directory,
const std::string &  zipFile,
bool  overwrite 
)

Definition at line 37 of file zipit.cpp.

◆ zipError()

void mars::smurf::Zipit::zipError ( ZipitError  errorNumber)
private

until now, this function does nothing, but in future it should be just to generate uniformed errorMessages

Definition at line 256 of file zipit.cpp.

Member Data Documentation

◆ unZipHandle

unzFile mars::smurf::Zipit::unZipHandle
private

Definition at line 136 of file zipit.h.

◆ zipFileName

std::string mars::smurf::Zipit::zipFileName
private

Definition at line 137 of file zipit.h.

◆ zipHandle

zipFile mars::smurf::Zipit::zipHandle
private

just a few internal variables.

Definition at line 135 of file zipit.h.


The documentation for this class was generated from the following files: