MCPcopy Create free account
hub / github.com/OpenMW/openmw / openBinaryInputFileStream

Function openBinaryInputFileStream

components/files/openfile.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace Files
8{
9 std::unique_ptr<std::ifstream> openBinaryInputFileStream(const std::filesystem::path& path)
10 {
11 auto stream = std::make_unique<std::ifstream>(path, std::ios::binary);
12 if (!stream->is_open())
13 throw std::system_error(errno, std::generic_category(),
14 "Failed to open '" + Files::pathToUnicodeString(path) + "' for reading");
15 stream->exceptions(std::ios::badbit);
16 return stream;
17 }
18}

Callers 6

openRawMethod · 0.85
openMethod · 0.85
addFilesMethod · 0.85
loadFunction · 0.85
getCellNamesMethod · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected