MCPcopy Create free account
hub / github.com/Tencent/tgfx / MakeFromFile

Method MakeFromFile

src/core/utils/WriteStream.cpp:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69/////////////////////////////////////////////////////////////////////////////////////////////////
70
71std::shared_ptr<WriteStream> WriteStream::MakeFromFile(const std::string& filePath) {
72 if (filePath.empty()) {
73 return nullptr;
74 }
75 auto file = fopen(filePath.c_str(), "wb");
76 if (file == nullptr) {
77 return nullptr;
78 }
79 return std::shared_ptr<WriteStream>(new FileWriteStream(file));
80}
81
82/////////////////////////////////////////////////////////////////////////////////////////////////
83

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected