Function extractMatching

Synopsis

#include <include/bitextractor.hpp>

void extractMatching(const wstring &in_file, const wstring &item_filter, const wstring &out_dir=L"") const

Description

Extracts the wildcard matching files in the given archive into the choosen directory.

Parameters

in_file - the input archive file.

item_filter - the wildcard pattern used for matching the paths of files inside the archive.

out_dir - the output directory where extracted files will be put.

Mentioned in

Source

Lines 52-60 in src/bitextractor.cpp. Line 67 in include/bitextractor.hpp.

void BitExtractor::extractMatching( const wstring& in_file, const wstring& item_filter, const wstring& out_dir ) const {
    if ( item_filter.empty() ) {
        throw BitException( "Empty wildcard filter", E_INVALIDARG );
    }

    extractMatchingFilter( in_file, out_dir, [ &item_filter ]( const wstring& item_path ) -> bool {
        return fsutil::wildcardMatch( item_filter, item_path );
    });
}





Add Discussion as Guest

Log in