basic_ofstream::is_open

bool is_open();

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