OpenStudio:utilities
Loading...
Searching...
No Matches
openstudio::UnzipFile Class Reference

#include <UnzipFile.hpp>

Public Member Functions

unsigned long chunksize () const
 
std::vector< openstudio::pathextractAllFiles (const openstudio::path &outputPath) const
 Extracts all files in the archive to the given path, preserving relative paths.
 
openstudio::path extractFile (const openstudio::path &filename, const openstudio::path &outputPath) const
 Extracts the given file to the specified path.
 
std::vector< openstudio::pathlistFiles () const
 Returns a list of files contained in the current archive.
 
void setChunksize (unsigned long chunksize)
 
 UnzipFile (const openstudio::path &filename)
 Constructs a UnzipFile object, opening the given file name.
 
 ~UnzipFile ()
 

Constructor & Destructor Documentation

◆ UnzipFile()

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

◆ ~UnzipFile()

openstudio::UnzipFile::~UnzipFile ( )

Member Function Documentation

◆ chunksize()

unsigned long openstudio::UnzipFile::chunksize ( ) const

◆ extractAllFiles()

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.

◆ extractFile()

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"

◆ listFiles()

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

Returns a list of files contained in the current archive.

◆ setChunksize()

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