10#ifndef BITARCHIVEEDITOR_HPP
11#define BITARCHIVEEDITOR_HPP
13#include <unordered_map>
15#include "bitarchivewriter.hpp"
156 auto findItem(
const tstring& itemPath ) -> uint32_t;
158 void checkIndex( uint32_t index );
162 auto itemStream( InputIndex index, ISequentialInStream** inStream )
const -> HRESULT
override;
164 auto hasNewData( uint32_t index )
const noexcept ->
bool override;
166 auto hasNewProperties( uint32_t index )
const noexcept ->
bool override;
The Bit7zLibrary class allows accessing the basic functionalities provided by the 7z DLLs.
Definition bit7zlibrary.hpp:56
The BitArchiveEditor class allows creating new file archives or updating old ones.
Definition bitarchiveeditor.hpp:30
void updateItem(const tstring &itemPath, istream &inStream)
Requests to update the content of the item at the specified path with the data from the given stream.
void deleteItem(uint32_t index)
Marks the item at the given index as deleted.
void applyChanges()
Applies the requested changes (i.e., rename/update/delete operations) to the input archive.
void renameItem(const tstring &oldPath, const tstring &newPath)
Requests to change the path of the item from oldPath to the newPath.
void setUpdateMode(UpdateMode mode) override
Sets how the editor performs the update of the items in the archive.
void updateItem(uint32_t index, const tstring &inFile)
Requests to update the content of the item at the specified index with the data from the given file.
void updateItem(const tstring &itemPath, const std::vector< byte_t > &inBuffer)
Requests to update the content of the item at the specified path with the data from the given buffer.
void deleteItem(const tstring &itemPath)
Marks the item at the given path (in the archive) as deleted.
void updateItem(uint32_t index, const std::vector< byte_t > &inBuffer)
Requests to update the content of the item at the specified index with the data from the given buffer...
void renameItem(uint32_t index, const tstring &newPath)
Requests to change the path of the item at the specified index with the given one.
void updateItem(const tstring &itemPath, const tstring &inFile)
Requests to update the content of the item at the specified path with the data from the given file.
void updateItem(uint32_t index, std::istream &inStream)
Requests to update the content of the item at the specified index with the data from the given stream...
BitArchiveEditor(const Bit7zLibrary &lib, const tstring &inFile, const BitInOutFormat &format, const tstring &password={})
Constructs a BitArchiveEditor object, reading the given archive file path.
The BitArchiveWriter class allows creating new archives or updating old ones with new items.
Definition bitarchivewriter.hpp:20
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:30
BitProperty
The BitProperty enum represents the archive/item properties that 7-zip can read or write.
Definition bitpropvariant.hpp:30
UpdateMode
Enumeration representing how an archive creator should deal when the output archive already exists.
Definition bitabstractarchivecreator.hpp:34
The BitPropVariant struct is a light extension to the WinAPI PROPVARIANT struct providing useful gett...
Definition bitpropvariant.hpp:150