Files
Magne Sjaastad de35c760c0 #12663 Add file search tools and updates ensemble import
Introduces a new set of tools for searching files and directories recursively.

Update the ensemble import functionality to use the new file search tools.

Mark the old file system search function as obsolete.
2025-07-24 15:18:14 +02:00

48 lines
1.9 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2025 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "Summary/RiaSummaryDefines.h"
#include <QStringList>
class RimSummaryCase;
namespace RiaEnsembleImportTools
{
struct CreateConfig
{
RiaDefines::FileType fileType;
bool ensembleOrGroup;
bool allowDialogs;
bool buildSummaryAddresses = true;
};
std::vector<RimSummaryCase*> createSummaryCasesFromFiles( const QStringList& fileNames, CreateConfig createConfig );
std::pair<QString, QString> findPathPattern( const QStringList& filePaths, const QString& placeholderString );
QStringList createPathsFromPattern( const QString& basePath, const QString& numberRange, const QString& placeholderString );
QStringList createPathsBySearchingFileSystem_obsolete( const QString& pathPattern,
const QString& placeholderString,
const QString& enumerationString );
QStringList createPathsBySearchingFileSystem( const QString& pathPattern, const QString& extension, const QString& placeholderString );
QStringList getMatchingFiles( const QString& basePath, const QString& regexPattern );
} // namespace RiaEnsembleImportTools