MCPcopy Create free account
hub / github.com/EasyRPG/Player / OpenInputStream

Method OpenInputStream

src/filesystem.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37Filesystem_Stream::InputStream Filesystem::OpenInputStream(std::string_view name, std::ios_base::openmode m) const {
38 if (name.empty()) {
39 return Filesystem_Stream::InputStream();
40 }
41
42 std::streambuf* buf = CreateInputStreambuffer(name, m | std::ios_base::in);
43
44 if (!buf) {
45 return Filesystem_Stream::InputStream();
46 }
47
48 Filesystem_Stream::InputStream is(buf, ToString(name));
49 return is;
50}
51
52Filesystem_Stream::InputStream Filesystem::OpenOrCreateInputStream(std::string_view name, std::ios_base::openmode m) const {
53 auto is = OpenInputStream(name, m);

Callers 15

PopulateSaveWindowMethod · 0.80
CreateRequestMappingMethod · 0.80
CommandManiacLoadMethod · 0.80
vio_openFunction · 0.80
RefreshEngineFontMethod · 0.80
LoadMapFileMethod · 0.80
LookupInternalMethod · 0.80
DetectMethod · 0.80
LoadMethod · 0.80
LogSourceMethod · 0.80
RequestAndAddMapMethod · 0.80

Calls 2

InputStreamClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected