Lines Matching refs:fstream
128 std::ifstream fstream(path, std::ios::in); in ReadFile() local
129 if (fstream) { in ReadFile()
131 fstream.seekg(0, std::ios::end); in ReadFile()
132 contents.reserve((std::string::size_type)fstream.tellg()); in ReadFile()
133 fstream.seekg(0, std::ios::beg); in ReadFile()
134 contents.assign((std::istreambuf_iterator<char>(fstream)), in ReadFile()
143 std::ifstream fstream(path, std::fstream::in | std::fstream::binary); in ReadSpvBinaryFile() local
145 if (!fstream) in ReadSpvBinaryFile()
151 fstream.seekg(0, fstream.end); in ReadSpvBinaryFile()
152 contents.reserve(size_t(fstream.tellg()) / sizeof(std::uint32_t)); in ReadSpvBinaryFile()
153 fstream.seekg(0, fstream.beg); in ReadSpvBinaryFile()
156 while (!fstream.eof()) { in ReadSpvBinaryFile()
158 fstream.read((char *)&inWord, sizeof(inWord)); in ReadSpvBinaryFile()
160 if (!fstream.eof()) in ReadSpvBinaryFile()
169 std::ofstream fstream(path, std::ios::out); in WriteFile() local
170 if (!fstream) return false; in WriteFile()
171 fstream << contents; in WriteFile()
172 fstream.flush(); in WriteFile()