9 fileSize(std::ifstream& file)
11 std::streamoff curr = file.tellg();
13 file.seekg(0, std::ios::end);
14 std::streamoff size = file.tellg();
15 file.seekg(0, std::ios::beg);
18 file.seekg(curr, std::ios::beg);
23 fileSize(std::ofstream& file)
25 std::streamoff curr = file.tellp();
27 file.seekp(0, std::ios::end);
28 std::streamoff size = file.tellp();
29 file.seekp(0, std::ios::beg);
32 file.seekp(curr, std::ios::beg);
37 operator<<(std::ostream& stream, pair_type data)
39 return stream << "(" << data.first << ", " << data.second << ")";
43 readRows(std::ifstream& file, std::list<std::string>& rows, bool skipEmptyRows)
48 std::getline(file, buf);
49 if(skipEmptyRows && buf.length() == 0) { continue; }