MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / get_files_name

Function get_files_name

src/audio/base/Utils.cpp:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116auto get_files_name(const std::filesystem::path& dir_path, const std::string& ext) -> std::vector<std::string> {
117 std::vector<std::string> names;
118
119 for (std::filesystem::directory_iterator it{dir_path}; it != std::filesystem::directory_iterator{}; ++it) {
120 if (std::filesystem::is_regular_file(it->status())) {
121 if (it->path().extension() == ext) {
122 names.push_back(it->path().stem().string());
123 }
124 }
125 }
126
127 return names;
128}
129
130auto util::str_contains(const std::string& haystack, const std::string& needle) -> bool {
131 // This helper indicates if the needle is contained in the haystack string,

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.80
statusMethod · 0.45
pathMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected