Hi Samer,
On 18.07.2015 16:23, Samer Afach wrote:
Dear pros:
I have two similar issues I would like to ask about, and I'd be
grateful if you could help me:
1- How can I check HDF5 file integrity in C/C++ (I prefer low level
C)? I know there's a software called h5check, but I need a function to
do that, not a software. In my application, it's not an option to
execute h5check from my system.
Is there any objection against you taking the source code of h5check,
rename the main function to h5check_main() and then call it as C
function from your code?
2- How can I do a quick check in C/C++ to see whether the file is
being written/modified/open for write? I looked in this link
<https://www.hdfgroup.org/HDF5/doc/H5.format.html#FileMetaData> which
discusses metadata, but there doesn't seem to be a clear way through
the C/C++ interface for me a to read the first two bits that give me
that information. Could you please help with that with a simple example?
This sounds as if you want to know what the HDF5 library is currently
doing with a file? Well what you could do is to modify the virtual file
driver that you want to use, and let it keep track of that happens with
the file. It's the VFD that does the actual writing of a file content,
so you can trace its write() call to keep track what exactly happens
when. It's some effort of course.
Cheers,
Werner
All the best,
Samer
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5