basic_filebuf();
basic_filebuf(basic_filebuf&& rhs);
virtual ~basic_filebuf();
basic_filebuf& operator=(basic_filebuf&& rhs);
void swap(basic_filebuf& rhs);
template<class charT, class traits>
void swap(basic_filebuf<charT, traits>& x, basic_filebuf<charT, traits>& y);
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;
streamsize showmanyc() override;
int_type underflow() override;
int_type uflow() override;
int_type pbackfail(int_type c = traits::eof()) override;
int_type overflow(int_type c = traits::eof()) override;
basic_streambuf* setbuf(char_type* s, streamsize n) override;
pos_type seekoff(off_type off, ios_base::seekdir way,
ios_base::openmode which
= ios_base::in | ios_base::out) override;
pos_type seekpos(pos_type sp,
ios_base::openmode which
= ios_base::in | ios_base::out) override;
1. | if (om & ios_base::out) != 0, then update the output sequence and write any unshift sequence; |
2. | set the file position to sp as if by a call to fsetpos; |
3. | if (om & ios_base::in) != 0, then update the input sequence; |
int sync() override;
void imbue(const locale& loc) override;