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  | ||
+  | "w"  | |||||
+  | +  | "w"  | ||||
+  | +  | "a"  | ||||
+  | "a"  | |||||
+  | "r"  | |||||
+  | +  | "r+"  | ||||
+  | +  | +  | "w+"  | |||
+  | +  | +  | "a+"  | |||
+  | +  | "a+"  | ||||
+  | +  | "wb"  | ||||
+  | +  | +  | "wb"  | |||
+  | +  | +  | "ab"  | |||
+  | +  | "ab"  | ||||
+  | +  | "rb"  | ||||
+  | +  | +  | "r+b"  | |||
+  | +  | +  | +  | "w+b"  | ||
+  | +  | +  | +  | "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();