OpenStudio:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "UnzipFile.hpp"

Public Member Functions

unsigned long chunksize () const
std::vector< openstudio::pathextractAllFiles (const openstudio::path &outputPath) const
openstudio::path extractFile (const openstudio::path &filename, const openstudio::path &outputPath) const
std::vector< openstudio::pathlistFiles () const
void setChunksize (unsigned long chunksize)
 UnzipFile (const openstudio::path &filename)
 ~UnzipFile ()

Constructor & Destructor Documentation

openstudio::UnzipFile::UnzipFile ( const openstudio::path filename)

Constructs a UnzipFile object, opening the given file name.

Throws if file could not be opened

Parameters
[in]filenamefilename to open
openstudio::UnzipFile::~UnzipFile ( )

Member Function Documentation

unsigned long openstudio::UnzipFile::chunksize ( ) const
std::vector<openstudio::path> openstudio::UnzipFile::extractAllFiles ( const openstudio::path outputPath) const

Extracts all files in the archive to the given path, preserving relative paths.

openstudio::path openstudio::UnzipFile::extractFile ( const openstudio::path filename,
const openstudio::path outputPath 
) const

Extracts the given file to the specified path.

Relative paths are preserved Example: extractFile("dir/filename", "outputpath") creates the file "outputpath/dir/filename"

std::vector<openstudio::path> openstudio::UnzipFile::listFiles ( ) const

Returns a list of files contained in the current archive.

void openstudio::UnzipFile::setChunksize ( unsigned long  chunksize)