3 namespace foreign_storage {
6 const std::string& pattern,
7 const std::vector<Aws::S3::Model::Object>& objects_list) {
8 boost::regex regex_pattern(pattern);
9 std::vector<Aws::S3::Model::Object> matched_objects_list;
10 for (
const auto&
object : objects_list) {
11 if (boost::regex_match(
object.GetKey(), regex_pattern)) {
12 matched_objects_list.emplace_back(
object);
15 if (matched_objects_list.empty()) {
18 return matched_objects_list;
23 const std::vector<Aws::S3::Model::Object>& file_paths,
33 auto initial_file_order =
FileOrderS3(temp_options);
34 auto lexi_comp = initial_file_order.getFileComparator();
35 std::stable_sort(result_files.begin(), result_files.end(), lexi_comp);
38 auto comp = file_order.getFileComparator();
39 std::stable_sort(result_files.begin(), result_files.end(), comp);
std::optional< std::string > filter_regex
void throw_no_filter_match(const std::string &pattern)
std::vector< Aws::S3::Model::Object > s3_objects_filter_sort_files(const std::vector< Aws::S3::Model::Object > &file_paths, const shared::FilePathOptions &options)
std::vector< Aws::S3::Model::Object > s3_objects_regex_file_filter(const std::string &pattern, const std::vector< Aws::S3::Model::Object > &objects_list)
const std::string PATHNAME_ORDER_TYPE
std::optional< std::string > sort_by