diff --git a/include/bit7z/bitarchivereader.hpp b/include/bit7z/bitarchivereader.hpp index c064f0db..6cff440c 100644 --- a/include/bit7z/bitarchivereader.hpp +++ b/include/bit7z/bitarchivereader.hpp @@ -33,13 +33,13 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA * On the contrary, when `BIT7Z_AUTO_FORMAT` is not defined (i.e., no auto format detection available), * the format argument must be specified. * - * @param lib the 7z library used. - * @param in_file the input archive file path. - * @param format the input archive format. - * @param password the password needed for opening the input archive. + * @param lib the 7z library used. + * @param in_archive the path to the archive to be read. + * @param format the format of the input archive. + * @param password the password needed for opening the input archive. */ BitArchiveReader( const Bit7zLibrary& lib, - const tstring& in_file, + const tstring& in_archive, const BitInFormat& format BIT7Z_DEFAULT_FORMAT, const tstring& password = {} ); @@ -51,13 +51,13 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA * On the contrary, when `BIT7Z_AUTO_FORMAT` is not defined (i.e., no auto format detection available), * the format argument must be specified. * - * @param lib the 7z library used. - * @param in_buffer the input buffer containing the archive. - * @param format the input archive format. - * @param password the password needed for opening the input archive. + * @param lib the 7z library used. + * @param in_archive the input buffer containing the archive to be read. + * @param format the format of the input archive. + * @param password the password needed for opening the input archive. */ BitArchiveReader( const Bit7zLibrary& lib, - const vector< byte_t >& in_buffer, + const vector< byte_t >& in_archive, const BitInFormat& format BIT7Z_DEFAULT_FORMAT, const tstring& password = {} ); @@ -69,13 +69,13 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA * On the contrary, when `BIT7Z_AUTO_FORMAT` is not defined (i.e., no auto format detection available), * the format argument must be specified. * - * @param lib the 7z library used. - * @param in_stream the standard input stream of the archive. - * @param format the input archive format. - * @param password the password needed for opening the input archive. + * @param lib the 7z library used. + * @param in_archive the standard input stream of the archive to be read. + * @param format the format of the input archive. + * @param password the password needed for opening the input archive. */ BitArchiveReader( const Bit7zLibrary& lib, - std::istream& in_stream, + std::istream& in_archive, const BitInFormat& format BIT7Z_DEFAULT_FORMAT, const tstring& password = {} ); diff --git a/include/bit7z/bitarchivewriter.hpp b/include/bit7z/bitarchivewriter.hpp index 3f72d368..50fec6be 100644 --- a/include/bit7z/bitarchivewriter.hpp +++ b/include/bit7z/bitarchivewriter.hpp @@ -30,39 +30,39 @@ class BitArchiveWriter : public BitAbstractArchiveCreator, public BitOutputArchi /** * @brief Constructs a BitArchiveWriter object, reading the given archive file path. * - * @param lib the 7z library to use. - * @param in_file the path to an input archive file. - * @param format the input/output archive format. - * @param password (optional) the password needed to read the input archive. + * @param lib the 7z library to use. + * @param in_archive the path to an input archive file. + * @param format the input/output archive format. + * @param password (optional) the password needed to read the input archive. */ BitArchiveWriter( const Bit7zLibrary& lib, - const tstring& in_file, + const tstring& in_archive, const BitInOutFormat& format, const tstring& password = {} ); /** * @brief Constructs a BitArchiveWriter object, reading the archive in the given buffer. * - * @param lib the 7z library to use. - * @param in_buffer the buffer containing the input archive. - * @param format the input/output archive format. - * @param password (optional) the password needed to read the input archive. + * @param lib the 7z library to use. + * @param in_archive the buffer containing the input archive. + * @param format the input/output archive format. + * @param password (optional) the password needed to read the input archive. */ BitArchiveWriter( const Bit7zLibrary& lib, - const vector< byte_t >& in_buffer, + const vector< byte_t >& in_archive, const BitInOutFormat& format, const tstring& password = {} ); /** * @brief Constructs a BitArchiveWriter object, reading the archive from the given standard input stream. * - * @param lib the 7z library to use. - * @param in_stream the standard stream of the input archive. - * @param format the input/output archive format. - * @param password (optional) the password needed to read the input archive. + * @param lib the 7z library to use. + * @param in_archive the standard stream of the input archive. + * @param format the input/output archive format. + * @param password (optional) the password needed to read the input archive. */ BitArchiveWriter( const Bit7zLibrary& lib, - std::istream& in_stream, + std::istream& in_archive, const BitInOutFormat& format, const tstring& password = {} ); }; diff --git a/include/bit7z/bitextractor.hpp b/include/bit7z/bitextractor.hpp index 13a631b9..9a920d51 100644 --- a/include/bit7z/bitextractor.hpp +++ b/include/bit7z/bitextractor.hpp @@ -278,11 +278,11 @@ class BitExtractor final : public BitAbstractArchiveOpener { input_archive.extract( out_dir, matched_indices ); } - void extractMatchingFilter( Input in_arch, + void extractMatchingFilter( Input in_archive, vector< byte_t >& out_buffer, FilterPolicy policy, const function< bool( const tstring& ) >& filter ) const { - BitInputArchive input_archive( *this, in_arch ); + BitInputArchive input_archive( *this, in_archive ); const bool should_extract_matched_item = policy == FilterPolicy::Include; // Searching for files inside the archive that match the given filter diff --git a/src/bitarchivereader.cpp b/src/bitarchivereader.cpp index b35eaa0e..a19ed578 100644 --- a/src/bitarchivereader.cpp +++ b/src/bitarchivereader.cpp @@ -20,22 +20,22 @@ using namespace bit7z; BitArchiveReader::BitArchiveReader( const Bit7zLibrary& lib, - const tstring& in_file, + const tstring& in_archive, const BitInFormat& format, const tstring& password ) - : BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_file ) {} + : BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_archive ) {} BitArchiveReader::BitArchiveReader( const Bit7zLibrary& lib, - const vector< byte_t >& in_buffer, + const vector< byte_t >& in_archive, const BitInFormat& format, const tstring& password ) - : BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_buffer ) {} + : BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_archive ) {} BitArchiveReader::BitArchiveReader( const Bit7zLibrary& lib, - std::istream& in_stream, + std::istream& in_archive, const BitInFormat& format, const tstring& password ) - : BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_stream ) {} + : BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_archive ) {} map< BitProperty, BitPropVariant > BitArchiveReader::archiveProperties() const { map< BitProperty, BitPropVariant > result; diff --git a/src/bitarchivewriter.cpp b/src/bitarchivewriter.cpp index 92d95150..32546a4c 100644 --- a/src/bitarchivewriter.cpp +++ b/src/bitarchivewriter.cpp @@ -19,24 +19,24 @@ BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib, const BitInOutForma : BitAbstractArchiveCreator( lib, format ), BitOutputArchive( *this, tstring{} ) {} BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib, - const tstring& in_file, + const tstring& in_archive, const BitInOutFormat& format, const tstring& password ) : BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ), - BitOutputArchive( *this, in_file ) {} + BitOutputArchive( *this, in_archive ) {} BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib, - const std::vector< byte_t >& in_buffer, + const std::vector< byte_t >& in_archive, const BitInOutFormat& format, const tstring& password ) : BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ), - BitOutputArchive( *this, in_buffer ) {} + BitOutputArchive( *this, in_archive ) {} BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib, - std::istream& in_stream, + std::istream& in_archive, const BitInOutFormat& format, const tstring& password ) : BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ), - BitOutputArchive( *this, in_stream ) {} + BitOutputArchive( *this, in_archive ) {} } // namespace bit7z \ No newline at end of file diff --git a/src/bitinputarchive.cpp b/src/bitinputarchive.cpp index ab83357c..810c37a6 100644 --- a/src/bitinputarchive.cpp +++ b/src/bitinputarchive.cpp @@ -23,7 +23,6 @@ #include "internal/cfileinstream.hpp" #include "internal/fileextractcallback.hpp" #include "internal/fixedbufferextractcallback.hpp" -#include "internal/fsutil.hpp" #include "internal/streamextractcallback.hpp" #include "internal/opencallback.hpp" #include "internal/util.hpp" @@ -33,6 +32,10 @@ #include "internal/formatdetect.hpp" #endif +#if defined( _WIN32 ) && defined( BIT7Z_AUTO_PREFIX_LONG_PATHS ) +#include "internal/fsutil.hpp" +#endif + using namespace bit7z; using namespace NWindows; using namespace NArchive;