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

Method OpenOutputStream

src/filesystem.cpp:65–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65Filesystem_Stream::OutputStream Filesystem::OpenOutputStream(std::string_view name, std::ios_base::openmode m) const {
66 if (name.empty()) {
67 return Filesystem_Stream::OutputStream();
68 }
69
70 std::streambuf* buf = CreateOutputStreambuffer(name, m | std::ios_base::out);
71
72 if (!buf) {
73 return Filesystem_Stream::OutputStream();
74 }
75
76 std::string path;
77 std::tie(path, std::ignore) = FileFinder::GetPathAndFilename(name);
78 Filesystem_Stream::OutputStream os(buf, Subtree(path), ToString(name));
79
80 return os;
81}
82
83void Filesystem::ClearCache(std::string_view path) const {
84 tree->ClearCache(path);

Callers 15

CreateRequestMappingMethod · 0.80
TakeScreenshotMethod · 0.80
SaveMethod · 0.80
SaveMethod · 0.80
InitRecordingMethod · 0.80
game_config.cppFile · 0.80
CloseLogFileMethod · 0.80
ToFileMethod · 0.80
ExitMethod · 0.80
UploadSavegameStep2Method · 0.80

Calls 2

OutputStreamClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected