version 3.3

VRS::ZipFileCreator Class Reference

This class can be used to create ZIP files. More...

#include <vrs/io/zipfilecreator.h>

Inheritance diagram for VRS::ZipFileCreator:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 VRS_TYPEINFO (ZipFileCreator, SharedObj)
 ZipFileCreator (const std::string &zipFileName, bool append=false)
 Create a new empty ZIP file.
virtual ~ZipFileCreator ()
 Closes the ZIP file again.
virtual bool isValid () const
 Returns true, if the ZIP file could be created or reopened.
virtual bool add (const std::string &localFileName, const std::string &fileNameInZipFile=std::string())
 Copies the existing file "localFileName" into the ZIP file using the given "fileNameInZipFile".

Static Public Member Functions

static void zipDirectory (const std::string &directory, const std::string &zipFilename)
 Creates a zipfile names 'zipFilename' that contains everything contained in the dir 'directory'.


Detailed Description

This class can be used to create ZIP files.

Constructor & Destructor Documentation

VRS::ZipFileCreator::ZipFileCreator ( const std::string &  zipFileName,
bool  append = false 
)

Create a new empty ZIP file.

virtual VRS::ZipFileCreator::~ZipFileCreator (  )  [virtual]

Closes the ZIP file again.


Member Function Documentation

VRS::ZipFileCreator::VRS_TYPEINFO ( ZipFileCreator  ,
SharedObj   
)

virtual bool VRS::ZipFileCreator::isValid (  )  const [virtual]

Returns true, if the ZIP file could be created or reopened.

virtual bool VRS::ZipFileCreator::add ( const std::string &  localFileName,
const std::string &  fileNameInZipFile = std::string() 
) [virtual]

Copies the existing file "localFileName" into the ZIP file using the given "fileNameInZipFile".

If "fileNameInZipFile" is empty "localFileName" is used instead.

static void VRS::ZipFileCreator::zipDirectory ( const std::string &  directory,
const std::string &  zipFilename 
) [static]

Creates a zipfile names 'zipFilename' that contains everything contained in the dir 'directory'.

The filenames inside the zip file will include the relative pathnames inside 'directory'.


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

Generated on Wed May 23 06:00:19 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact