OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
foreign_storage::anonymous_namespace{S3FilePathUtil.cpp} Namespace Reference

Functions

std::vector
< Aws::S3::Model::Object > 
s3_objects_regex_file_filter (const std::string &pattern, const std::vector< Aws::S3::Model::Object > &objects_list)
 

Function Documentation

std::vector<Aws::S3::Model::Object> foreign_storage::anonymous_namespace{S3FilePathUtil.cpp}::s3_objects_regex_file_filter ( const std::string &  pattern,
const std::vector< Aws::S3::Model::Object > &  objects_list 
)

Definition at line 5 of file S3FilePathUtil.cpp.

References shared::throw_no_filter_match().

Referenced by foreign_storage::s3_objects_filter_sort_files().

7  {
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);
13  }
14  }
15  if (matched_objects_list.empty()) {
17  }
18  return matched_objects_list;
19 }
void throw_no_filter_match(const std::string &pattern)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: