Renaming HDF5 groups/datasets
Fri, 09/16/2022 - 12:02 pm
Is there a recommended way for renaming groups and datasets in an HDF5 file? I'm thinking of using HDF5CreateLink to make a new link to the object, followed by HDF5UnlinkObject to kill the old link.
My understanding is that HDF5UnlinkObject doesn't delete the object itself, but only the link reference to the object. So if multiple links to an object exist, unlinking one won't affect my use of the other links to the object. If I unlink the only existing link to an object, I no longer will be able to access that object despite its existence. Is this the correct way to think about this?
On a similar note, if I want to actually delete a dataset or group (and reclaim the space it occupied), it sounds like I need to use h5repack, or else more manually copy all existing links and objects to a completely new HDF5 file?