bool is_open() const;
basic_filebuf* open(const char* s, ios_base::openmode mode);
basic_filebuf* open(const filesystem::path::value_type* s,
                    ios_base::openmode mode);  // wide systems only; see [fstream.syn]
| ios_base flag combination | stdio equivalent | |||||
| binary | in | out | trunc | app | noreplace | |
| + | "w" | |||||
| + | + | "wx" | ||||
| + | + | "w" | ||||
| + | + | + | "wx" | |||
| + | + | "a" | ||||
| + | "a" | |||||
| + | "r" | |||||
| + | + | "r+" | ||||
| + | + | + | "w+" | |||
| + | + | + | + | "w+x" | ||
| + | + | + | "a+" | |||
| + | + | "a+" | ||||
| + | + | "wb" | ||||
| + | + | + | "wbx" | |||
| + | + | + | "wb" | |||
| + | + | + | + | "wbx" | ||
| + | + | + | "ab" | |||
| + | + | "ab" | ||||
| + | + | "rb" | ||||
| + | + | + | "r+b" | |||
| + | + | + | + | "w+b" | ||
| + | + | + | + | + | "w+bx" | |
| + | + | + | + | "a+b" | ||
| + | + | + | "a+b" | |||
basic_filebuf* open(const string& s, ios_base::openmode mode);
basic_filebuf* open(const filesystem::path& s, ios_base::openmode mode);
basic_filebuf* close();
native_handle_type native_handle() const noexcept;