10#ifndef BITARCHIVEEDITOR_HPP
11#define BITARCHIVEEDITOR_HPP
13#include <unordered_map>
15#include "bitarchivewriter.hpp"
151 void deleteItem( uint32_t index, DeletePolicy policy = DeletePolicy::ItemOnly );
183 auto findItem(
const tstring& itemPath ) -> uint32_t;
185 void checkIndex( uint32_t index );
189 auto itemStream( InputIndex index, ISequentialInStream** inStream )
const -> HRESULT
override;
191 auto hasNewData( uint32_t index )
const noexcept ->
bool override;
193 auto hasNewProperties( uint32_t index )
const noexcept ->
bool override;
195 void markItemAsDeleted( uint32_t index );
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:35
void deleteItem(uint32_t index, DeletePolicy policy=DeletePolicy::ItemOnly)
Marks as deleted the item at the given index.
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 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 deleteItem(const tstring &itemPath, DeletePolicy policy=DeletePolicy::ItemOnly)
Marks as deleted the archive's item(s) with the specified path.
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 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