Test for open stream.
bool is_open() const
Use is_open() to test that a stream is indeed open and ready for input from the file.
Returns true if file is open.
For example of basic_ifstream::is_open() usage see basic_ifstream::basic_ifstream()