30 Input/output library [input.output]

30.9 File-based streams [file.streams]

30.9.5 Class template basic_­fstream [fstream]

30.9.5.3 Member functions [fstream.members]

basic_filebuf<charT, traits>* rdbuf() const;

Returns: const_­cast<basic_­filebuf<charT, traits>*>(&sb).

bool is_open() const;

Returns: rdbuf()->is_­open().

void open( const char* s, ios_base::openmode mode = ios_base::in | ios_base::out); void open( const filesystem::path::value_type* s, ios_base::openmode mode = ios_base::in | ios_base::out); // wide systems only; see [fstream.syn]

Effects: Звонки rdbuf()->open(s, mode). Если эта функция не возвращает вызовы нулевого указателя clear(), в противном случае вызывает setstate(failbit) (который может вызывать ios_­base​::​failure) ([iostate.flags]).

void open( const string& s, ios_base::openmode mode = ios_base::in | ios_base::out); void open( const filesystem::path& s, ios_base::openmode mode = ios_base::in | ios_base::out);

Effects: Звонки open(s.c_­str(), mode).

void close();

Effects: Вызывает rdbuf()->close() и, если эта функция возвращает нулевой указатель, вызывает setstate(failbit) (который может вызывать ios_­base​::​failure) ([iostate.flags]).