MCPcopy Create free account
hub / github.com/GPUOpen-Tools/GPU-Reshape / ReadAllText

Function ReadAllText

Source/Libraries/Common/Source/FileSystem.cpp:131–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131std::string ReadAllText(const std::filesystem::path &path) {
132 std::ifstream stream(path);
133 if (!stream.good()) {
134 return "";
135 }
136
137 // Determine size
138 stream.seekg(0, std::ios::end);
139 std::ifstream::pos_type size = stream.tellg();
140
141 // Read contents
142 std::string str(static_cast<std::string::size_type>(size), ' ');
143 stream.seekg(0);
144 stream.read(&str[0], size);
145 return str;
146}
147
148static bool IsPathDelim(char _char) {
149 switch (_char) {

Callers 2

GetSteamAppManifestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected