Lines Matching refs:fin
274 std::ifstream fin(src); in CopyFile() local
276 if (!fin.is_open()) { in CopyFile()
282 fout << fin.rdbuf(); in CopyFile()
295 bool GetLastLine(std::istream &fin, std::string &line, uint32_t maxLen) in GetLastLine() argument
297 if (fin.tellg() <= 0) { in GetLastLine()
300 fin.seekg(-1, fin.cur); in GetLastLine()
303 while (fin.good() && fin.peek() == fin.widen('\n') && fin.tellg() > 0 && count < maxLen) { in GetLastLine()
304 fin.seekg(-1, fin.cur); in GetLastLine()
307 if (!fin.good() || count >= maxLen) { in GetLastLine()
310 if (fin.tellg() == 0) { in GetLastLine()
314 while (fin.good() && fin.peek() != fin.widen('\n') && fin.tellg() > 0 && count < maxLen) { in GetLastLine()
315 fin.seekg(-1, fin.cur); in GetLastLine()
318 if (!fin.good() || count >= maxLen) { in GetLastLine()
321 if (fin.tellg() != 0) { in GetLastLine()
322 fin.seekg(1, fin.cur); in GetLastLine()
324 auto oldPos = fin.tellg(); in GetLastLine()
325 getline(fin, line); in GetLastLine()
326 fin.seekg(oldPos); in GetLastLine()