Test to ensure filebuf stream is open for reading or writing.
bool is_open() const
Use the function is_open() for a filebuf stream to ensure it is open before attempting to do any input or output operation on the stream.
Returns true if stream is available and open.
For example of basic_filebuf::is_open() usage see basic_filebuf::basic_filebuf