Alexei Strots | 0cb1134 | 2023-05-03 15:51:18 -0700 | [diff] [blame] | 1 | #include "aos/events/logging/s3_file_operations.h" |
Alexei Strots | 1bf05be | 2023-04-21 11:07:37 -0700 | [diff] [blame] | 2 | |
| 3 | #include "aos/events/logging/s3_fetcher.h" |
| 4 | |
| 5 | namespace aos::logger::internal { |
| 6 | |
| 7 | S3FileOperations::S3FileOperations(std::string_view url) |
| 8 | : object_urls_(ListS3Objects(url)) {} |
| 9 | |
| 10 | void S3FileOperations::FindLogs(std::vector<std::string> *files) { |
| 11 | // We already have a recursive listing, so just grab all the objects from |
| 12 | // there. |
| 13 | for (const std::string &object_url : object_urls_) { |
| 14 | if (IsValidFilename(object_url)) { |
| 15 | files->push_back(object_url); |
| 16 | } |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | } // namespace aos::logger::internal |