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

Function read_text_file

src/framework/io/filesystem.cpp:59–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59std::string read_text_file(const std::filesystem::path & path) {
60 std::ifstream input(path, std::ios::binary);
61 if (!input) {
62 throw std::runtime_error("failed to open text file: " + path.string());
63 }
64 std::ostringstream buffer;
65 buffer << input.rdbuf();
66 return buffer.str();
67}
68
69} // namespace engine::io

Callers 7

parse_fileFunction · 0.70
load_config_mapFunction · 0.70
read_textMethod · 0.50
load_vocab_fileFunction · 0.50
parse_roformer_yaml_fileFunction · 0.50
parse_configFunction · 0.50
parse_jsonc_fileFunction · 0.50

Calls 1

strMethod · 0.80

Tested by

no test coverage detected