title: How can I check that a file is a valid HDF5 file?
body: <p>Based on the example given <a href="https://stackoverflow.com/questions/31344648/c-c-hdf5-read-string-attribute/31351401#31351401">here</a>, I have a file image loaded into memory as a string with a valid handler. This was done using <code>H5LTopen_file_image()</code>.</p>
  
  <p>How can I check that a file is a valid HDF5 file? </p>
  
  <p>I found only a program called <a href="https://support.hdfgroup.org/products/hdf5_tools/h5check.html" rel="nofollow noreferrer"><code>H5check</code></a>, which has a complicated source code. So, I'm wondering, is there a simple function with a simple return value to verify that whatever in the <code>hid_t</code> handler is a valid HDF5 file?</p>