26 lines
No EOL
637 B
C++
26 lines
No EOL
637 B
C++
#include <algorithm>
|
|
#include <concepts>
|
|
#include <filesystem>
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include <iterator>
|
|
#include <ranges>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
namespace fs = std::filesystem;
|
|
namespace rn = std::ranges;
|
|
|
|
std::vector<fs::path> searchFiles(std::string_view keyWord, const fs::path& dirName) {
|
|
std::vector<fs::path> paths;
|
|
|
|
// Write implementation here
|
|
|
|
return paths;
|
|
}
|
|
|
|
int main() {
|
|
std::cout << "Files which contains word Ala:\n";
|
|
const auto& res = searchFiles("Ala", fs::current_path().string() + "/files");
|
|
rn::copy(res, std::ostream_iterator<fs::path>(std::cout, "\n"));
|
|
} |