| 160 | } |
| 161 | |
| 162 | void ifstream::open(const fs::path& p, std::ios_base::openmode mode) |
| 163 | { |
| 164 | close(); |
| 165 | mode |= std::ios_base::in; |
| 166 | m_file = fsbridge::fopen(p, openmodeToStr(mode).c_str()); |
| 167 | if (m_file == nullptr) { |
| 168 | return; |
| 169 | } |
| 170 | m_filebuf = __gnu_cxx::stdio_filebuf<char>(m_file, mode); |
| 171 | rdbuf(&m_filebuf); |
| 172 | if (mode & std::ios_base::ate) { |
| 173 | seekg(0, std::ios_base::end); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | void ifstream::close() |
| 178 | { |
no test coverage detected