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

Function require_directory

src/framework/io/filesystem.cpp:19–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19std::filesystem::path require_directory(const std::filesystem::path & path, std::string_view role) {
20 if (!is_existing_directory(path)) {
21 throw std::runtime_error("missing " + std::string(role) + " directory: " + path.string());
22 }
23 return std::filesystem::weakly_canonical(path);
24}
25
26std::filesystem::path require_file(const std::filesystem::path & path, std::string_view role) {
27 if (!is_existing_file(path)) {

Callers

nothing calls this directly

Calls 2

is_existing_directoryFunction · 0.85
stringFunction · 0.50

Tested by

no test coverage detected