<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Class Poco::Zip::ZipManipulator</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/> <meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/> <meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/> <meta name="language" content="en"/> <meta name="date" content="2009-11-24"/> <meta name="generator" content="PocoDoc"/> <link rel="stylesheet" href="css/styles.css" type="text/css"/> </head> <body bgcolor="#ffffff" leftmargin="0" topmargin="0"> <div class="header"> <h1 class="namespace"><a href="Poco.Zip.html" class="namespace">Poco::Zip</a></h1> <h1 class="symbol">class ZipManipulator</h1> </div> <div class="body"> <p> <b>Library:</b> Zip<br /> <b>Package:</b> Manipulation<br /> <b>Header:</b> Poco/Zip/ZipManipulator.h</p> <h2>Description</h2> <div class="description"> <p><a href="Poco.Zip.ZipManipulator.html" title="class Poco::Zip::ZipManipulator">ZipManipulator</a> allows to add/remove/update files inside zip files </p> </div> <h2>Member Summary</h2> <p><b>Member Functions: </b><a href="Poco.Zip.ZipManipulator.html#20733" title="Poco::Zip::ZipManipulator::addFile()">addFile</a>, <a href="Poco.Zip.ZipManipulator.html#20738" title="Poco::Zip::ZipManipulator::commit()">commit</a>, <a href="Poco.Zip.ZipManipulator.html#20725" title="Poco::Zip::ZipManipulator::deleteFile()">deleteFile</a>, <a href="Poco.Zip.ZipManipulator.html#20739" title="Poco::Zip::ZipManipulator::originalArchive()">originalArchive</a>, <a href="Poco.Zip.ZipManipulator.html#20730" title="Poco::Zip::ZipManipulator::renameFile()">renameFile</a>, <a href="Poco.Zip.ZipManipulator.html#20727" title="Poco::Zip::ZipManipulator::replaceFile()">replaceFile</a></p> <h2>Constructors</h2> <h3><a name="20721">ZipManipulator</a></h3> <p class="decl"><a href="Poco.Zip.ZipManipulator.html" title="class Poco::Zip::ZipManipulator">ZipManipulator</a>(<br /> const std::string & zipFile,<br /> bool backupOriginalFile<br />);</p> <div class="description"> <p>Creates the <a href="Poco.Zip.ZipManipulator.html" title="class Poco::Zip::ZipManipulator">ZipManipulator</a>. </p> </div> <h2>Destructor</h2> <h3><a name="20724">~ZipManipulator</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">virtual ~<a href="Poco.Zip.ZipManipulator.html" title="class Poco::Zip::ZipManipulator">ZipManipulator</a>();</p> <div class="description"> <p>Destroys the <a href="Poco.Zip.ZipManipulator.html" title="class Poco::Zip::ZipManipulator">ZipManipulator</a>. </p> </div> <h2>Member Functions</h2> <h3><a name="20733">addFile</a></h3> <p class="decl">void addFile(<br /> const std::string & zipPath,<br /> const std::string & localPath,<br /> <a href="Poco.Zip.ZipCommon.html#20371" title="enum Poco::Zip::ZipCommon::CompressionMethod">ZipCommon::CompressionMethod</a> cm = ZipCommon::CM_DEFLATE,<br /> <a href="Poco.Zip.ZipCommon.html#20384" title="enum Poco::Zip::ZipCommon::CompressionLevel">ZipCommon::CompressionLevel</a> cl = ZipCommon::CL_MAXIMUM<br />);</p> <div class="description"> <p>Adds a file to the zip file. </p> </div> <h3><a name="20738">commit</a></h3> <p class="decl"><a href="Poco.Zip.ZipArchive.html" title="class Poco::Zip::ZipArchive">ZipArchive</a> commit();</p> <div class="description"> <p>Commits all changes and re-creates the <a href="Poco.Zip.html" title="namespace Poco::Zip">Zip</a> <a href="Poco.File.html" title="class Poco::File">File</a> with the changes applied. Returns the <a href="Poco.Zip.ZipArchive.html" title="class Poco::Zip::ZipArchive">ZipArchive</a> for the newly created archive </p> <p><a href="Poco.Zip.ZipManipulator.html#20750" title="Poco::Zip::ZipManipulator::Changes">Changes</a> will be first written to a temporary file, then the originalfile will be either deleted or renamed to .bak, then, the temp file will be renamed to the original zip file name. </p> </div> <h3><a name="20725">deleteFile</a></h3> <p class="decl">void deleteFile(<br /> const std::string & zipPath<br />);</p> <div class="description"> <p>Removes the given file from the <a href="Poco.Zip.html" title="namespace Poco::Zip">Zip</a> archive. </p> </div> <h3><a name="20739">originalArchive</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">const <a href="Poco.Zip.ZipArchive.html" title="class Poco::Zip::ZipArchive">ZipArchive</a> & originalArchive() const;</p> <div class="description"> <p>Returns the original archive information </p> </div> <h3><a name="20730">renameFile</a></h3> <p class="decl">void renameFile(<br /> const std::string & zipPath,<br /> const std::string & newZipPath<br />);</p> <div class="description"> <p>Renames the file in the archive to newZipPath </p> </div> <h3><a name="20727">replaceFile</a></h3> <p class="decl">void replaceFile(<br /> const std::string & zipPath,<br /> const std::string & localPath<br />);</p> <div class="description"> <p>Replaces the contents of the file in the archive with the contents from the file given by localPath. </p> </div> <h2>Variables</h2> <h3><a name="20720">EDone</a></h3> <p class="decl"><a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">Poco::FIFOEvent</a> < const <a href="Poco.Zip.ZipLocalFileHeader.html" title="class Poco::Zip::ZipLocalFileHeader">ZipLocalFileHeader</a> > <a href="Poco.Zip.ZipManipulator.html#20720" title="Poco::Zip::ZipManipulator::EDone">EDone</a>;</p> <div class="description"> <p></p> </div> <p class="footer">POCO C++ Libraries 1.3.6-all<br /> Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p> </div> </body> </html>