MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / collect_existing

Function collect_existing

src/framework/io/filesystem.cpp:45–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45std::vector<std::filesystem::path> collect_existing(
46 const std::filesystem::path & root,
47 const std::vector<std::string> & relative_candidates) {
48 std::vector<std::filesystem::path> results;
49 results.reserve(relative_candidates.size());
50 for (const auto & candidate : relative_candidates) {
51 const auto path = root / candidate;
52 if (is_existing_file(path) || is_existing_directory(path)) {
53 results.push_back(std::filesystem::weakly_canonical(path));
54 }
55 }
56 return results;
57}
58
59std::string read_text_file(const std::filesystem::path & path) {
60 std::ifstream input(path, std::ios::binary);

Callers

nothing calls this directly

Calls 3

is_existing_fileFunction · 0.85
is_existing_directoryFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected