MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SaveToFile

Method SaveToFile

Source/Engine/Serialization/MemoryWriteStream.cpp:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68bool MemoryWriteStream::SaveToFile(const StringView& path) const
69{
70 // Open file for writing
71 auto file = File::Open(path, FileMode::CreateAlways, FileAccess::Write, FileShare::Read);
72 if (file == nullptr)
73 {
74 return true;
75 }
76
77 // Write data
78 uint32 bytesWritten;
79 file->Write(GetHandle(), GetPosition(), &bytesWritten);
80
81 Delete(file);
82 return false;
83}
84
85void MemoryWriteStream::Flush()
86{

Callers 3

loadMethod · 0.80
SetCacheMethod · 0.80
loadMethod · 0.80

Calls 4

DeleteFunction · 0.85
GetHandleFunction · 0.50
GetPositionFunction · 0.50
WriteMethod · 0.45

Tested by

no test coverage detected