OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
openstudio::ZipFile Class Reference

#include <ZipFile.hpp>

Public Member Functions

void addDirectory (const openstudio::path &localDir, const openstudio::path &destinationDir)
 Recursively adds all files in localDir to the ZipFile, placing them in the archive relative to destinationDir. More...
 
void addFile (const openstudio::path &localPath, const openstudio::path &destinationPath)
 Adds localPath to the ZipFile, placing it at relative location destinationPath in the archive. More...
 
 ZipFile (const openstudio::path &filename, bool add)
 Constructs a ZipFile object, opening the given file name. More...
 
 ~ZipFile ()
 

Constructor & Destructor Documentation

openstudio::ZipFile::ZipFile ( const openstudio::path filename,
bool  add 
)

Constructs a ZipFile object, opening the given file name.

Throws if file could not be opened

Parameters
[in]filenamefilename to open
[in]addIf true, add new files to existing archive, if false, overwrite existing archive
openstudio::ZipFile::~ZipFile ( )

Member Function Documentation

void openstudio::ZipFile::addDirectory ( const openstudio::path localDir,
const openstudio::path destinationDir 
)

Recursively adds all files in localDir to the ZipFile, placing them in the archive relative to destinationDir.

void openstudio::ZipFile::addFile ( const openstudio::path localPath,
const openstudio::path destinationPath 
)

Adds localPath to the ZipFile, placing it at relative location destinationPath in the archive.