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

Function require_file

src/framework/io/filesystem.cpp:26–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26std::filesystem::path require_file(const std::filesystem::path & path, std::string_view role) {
27 if (!is_existing_file(path)) {
28 throw std::runtime_error("missing " + std::string(role) + " file: " + path.string());
29 }
30 return std::filesystem::weakly_canonical(path);
31}
32
33std::optional<std::filesystem::path> find_first_existing(
34 const std::filesystem::path & root,

Callers 3

read_textMethod · 0.50
parse_jsonMethod · 0.50
open_tensor_sourceMethod · 0.50

Calls 2

is_existing_fileFunction · 0.85
stringFunction · 0.50

Tested by

no test coverage detected