Files
2025-10-25 03:02:53 +03:00

2.5 KiB
Raw Permalink Blame History

[ifstream.members]

31 Input/output library [input.output]

31.10 File-based streams [file.streams]

31.10.4 Class template basic_ifstream [ifstream]

31.10.4.4 Member functions [ifstream.members]

🔗

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

1

#

Returns: const_cast<basic_filebuf<charT, traits>*>(addressof(sb)).

🔗

native_handle_type native_handle() const noexcept;

2

#

Effects: Equivalent to: return rdbuf()->native_handle();

🔗

bool is_open() const;

3

#

Returns: rdbuf()->is_open().

🔗

void open(const char* s, ios_base::openmode mode = ios_base::in); void open(const filesystem::path::value_type* s, ios_base::openmode mode = ios_base::in); // wide systems only; see [[fstream.syn]](fstream.syn "31.10.1Header <fstream> synopsis")

4

#

Effects: Callsrdbuf()->open(s, mode | ios_base::in).

If that function does not return a null pointer calls clear(), otherwise callssetstate(failbit) (which may throwios_base::failure) ([iostate.flags]).

🔗

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

5

#

Effects: Calls open(s.c_str(), mode).

🔗

void close();

6

#

Effects: Callsrdbuf()->close() and, if that function returns a null pointer, callssetstate(failbit) (which may throwios_base::failure) ([iostate.flags]).