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

#include <UnzipFile.hpp>

Public Member Functions

std::vector< openstudio::path > extractAllFiles (const openstudio::path &outputPath) const
 Extracts all files in the archive to the given path, preserving relative paths. More...
 
openstudio::path extractFile (const openstudio::path &filename, const openstudio::path &outputPath) const
 Extracts the given file to the specified path. More...
 
std::vector< openstudio::path > listFiles () const
 Returns a list of files contained in the current archive. More...
 
 UnzipFile (const openstudio::path &filename)
 Constructs a UnzipFile object, opening the given file name. More...
 
 ~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

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.