HDF5 files are handled in a way that is quite similar to
directories. If you want to create a file in a directory,
you must create the directory first. Similarly, if you want
to create a dataset in an HDF5 group, you must
create the group first. But before you can create
the group, you must create the HDF5 file itself.
The latter corresponds to the creation of a file system.
When you create an HDF5 file, the top level group,
is created automatically too. So this means that
an HDF5 file is never empty, there is at least one group
in it. And this, again, is much like the story with
the file system. A file system is never empty either.
There is always, at least, a top level directory in it.
Once you have created an HDF5 file, you can close it and go away. This is the same as with creating a file system. Once you have created it, you don't have to write on it right away. You can go home and write on it tomorrow, in the full knowledge that it won't go away in the meantime.
All example programs in this section are taken from the NCSA Tutorial.