basic_fstream::is_open

bool is_open();

The member function returns rdbuf()-> is_open().