Dear Werner:
Thank you for your response and your time.
I tried modifying the source code of h5check, but it's very
complicated and returns strings instead of error codes. Besides, I
tried to compile it by including the three files in the main c file
and it gave errors that don't seem to be easily trackable. It'll
take me lots of time to prepare something reliable out of it with
full testing. I wonder why the hdf group didn't implement such a
functionality in low language, I thought it exists and I can't find
it. :(
About my second question, apparently I wasn't clear on what I really
need and I was misunderstood. What I need is to check whether the
file I want to read is being accessed by some other program. My
problem is that the file I wanna deal with is being written by some
other program, and I want to initiate an upload after it's done
writing. So I would like to check whether the other program is
finished writing and closed it before I send it to my upload queue.
All the best,
Samer
On 18.07.2015 23:11, Werner Benger
wrote:
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 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
|
_______________________________________________
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