MCPcopy Create free account
hub / github.com/Apache553/SubtitleFontHelper / WriteToFile

Method WriteToFile

PersistantDataLib/PersistantData.cpp:709–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709void sfh::ConfigFile::WriteToFile(const std::wstring& path, const ConfigFile& config)
710{
711 auto com = wil::CoInitializeEx();
712
713 wil::com_ptr<IStream> stream;
714 THROW_IF_FAILED(
715 SHCreateStreamOnFileEx(
716 path.c_str(),
717 STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE,
718 FILE_ATTRIBUTE_NORMAL,
719 TRUE,
720 nullptr,
721 stream.put()));
722
723 auto document = ConfigFileToDocument(config);
724 WriteDocumentToFile(stream, document);
725}
726
727void sfh::FontDatabase::WriteToFile(const std::wstring& path, const FontDatabase& db)
728{

Callers

nothing calls this directly

Calls 3

ConfigFileToDocumentFunction · 0.85
WriteDocumentToFileFunction · 0.85
FontDatabaseToDocumentFunction · 0.85

Tested by

no test coverage detected