OpenStudio:utilities
Loading...
Searching...
No Matches
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.
 
void addFile (const openstudio::path &localPath, const openstudio::path &destinationPath)
 Adds localPath to the ZipFile, placing it at relative location destinationPath in the archive.
 
 ZipFile (const openstudio::path &filename, bool add)
 Constructs a ZipFile object, opening the given file name.
 
 ~ZipFile ()
 

Constructor & Destructor Documentation

◆ ZipFile()

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

◆ ~ZipFile()

openstudio::ZipFile::~ZipFile ( )

Member Function Documentation

◆ addDirectory()

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.

◆ addFile()

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.