I am trying to write data into a HDF5 file. And I want to check if the file already exists before I write. So I checked the status of H5Fopen.
file_id = H5Fopen(FILE2, H5F_ACC_RDWR, H5P_DEFAULT);
if (file_id < 0 ) {…}
But I always got the error message from function H5Fopen saying “unable to open to file”. Is there any way to check without having such message?