Lines Matching refs:fstream
126 std::ifstream fstream(path, std::ios::in); in ReadFile() local
127 if (fstream) { in ReadFile()
129 fstream.seekg(0, std::ios::end); in ReadFile()
130 contents.reserve((std::string::size_type)fstream.tellg()); in ReadFile()
131 fstream.seekg(0, std::ios::beg); in ReadFile()
132 contents.assign((std::istreambuf_iterator<char>(fstream)), in ReadFile()
141 std::ifstream fstream(path, std::fstream::in | std::fstream::binary); in ReadSpvBinaryFile() local
143 if (!fstream) in ReadSpvBinaryFile()
149 fstream.seekg(0, fstream.end); in ReadSpvBinaryFile()
150 contents.reserve(size_t(fstream.tellg()) / sizeof(std::uint32_t)); in ReadSpvBinaryFile()
151 fstream.seekg(0, fstream.beg); in ReadSpvBinaryFile()
154 while (!fstream.eof()) { in ReadSpvBinaryFile()
156 fstream.read((char *)&inWord, sizeof(inWord)); in ReadSpvBinaryFile()
158 if (!fstream.eof()) in ReadSpvBinaryFile()
167 std::ofstream fstream(path, std::ios::out); in WriteFile() local
168 if (!fstream) return false; in WriteFile()
169 fstream << contents; in WriteFile()
170 fstream.flush(); in WriteFile()