papalmac
papalmac

Reputation: 5

Renaming and removing groups in HDF5 file using HDF5 library

I'm using the HDFview application to modify a HDF5 data file. Basically what I do is check all groups, remove those that match an specific attribute value, rename some groups and adjust attribute values to make the file consistent for the application.

The thing is that I want to do the same thing but using the C++ HDF5 library. I've done a small application that iterates on the groups, but the thing is how can I can delete them? It seems that the spec do not allow that kind of operations. I also tried to unlink the group but the call fails. For the renaming part I tried to move the group, just like in unix prompt, but that did not work.

Other thing to noted is, if the specification do not allow deleting, How does HDFview supports that operation?

Any hint on this is very appreciated. Regards

Upvotes: 0

Views: 1640

Answers (1)

Quincey Koziol
Quincey Koziol

Reputation: 140

You should use the H5Ldelete routine (or the Group::unlink method in C++)

Upvotes: 2

Related Questions