MCPcopy Create free account
hub / github.com/crashfort/SourceDemoRender / ReadString

Method ReadString

Projects/Shared/Source/File.cpp:115–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 }
114
115 std::string ScopedFile::ReadString()
116 {
117 SeekAbsolute(0);
118 SeekEnd();
119
120 auto size = GetStreamPosition();
121
122 SeekAbsolute(0);
123
124 std::string ret(size, 0);
125
126 fread_s(&ret[0], ret.size(), size, 1, Get());
127
128 return ret;
129 }
130}

Callers 1

FromFileFunction · 0.80

Calls 1

GetFunction · 0.85

Tested by

no test coverage detected