MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / get_binary_file_contents

Function get_binary_file_contents

src/CPfilepaths.cpp:87–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85// ---- get_binary_file_contents -----------------------------------------------
86
87std::vector<char> get_binary_file_contents(const char* filename) {
88 std::ifstream in(filename, std::ios::in | std::ios::binary);
89 if (in) {
90 std::vector<char> contents;
91 in.seekg(0, std::ios::end);
92 contents.resize((unsigned int)in.tellg());
93 in.seekg(0, std::ios::beg);
94 in.read(&contents[0], contents.size());
95 in.close();
96 return (contents);
97 }
98 throw(errno);
99}
100
101// ---- write_bytes_atomic -----------------------------------------------------
102//

Callers 1

load_tableFunction · 0.85

Calls 2

resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected