Get total number of datasets in HDF5 file

Hello,

Is there a simple method of retrieving the total number of datasets within
an HDF5 file like how HDFView shows when you click on "Show Properties" for
the top file node? I've got code that iterates through all of the datasets
in a file, but I'd like to show a status indicator so I need to know the
total number of datasets. I can iterate once and count, but there must be
some property somewhere that has the total number of datasets. I'm using C#
and the .NET wrappers, but if someone knows where it is in the C library, I
can see if its there in the wrapper.

Regards,

Jesse Lai

Hi Jesse,

···

On Jul 10, 2009, at 4:58 PM, Jesse Lai wrote:

Hello,

Is there a simple method of retrieving the total number of datasets within an HDF5 file like how HDFView shows when you click on "Show Properties" for the top file node? I've got code that iterates through all of the datasets in a file, but I'd like to show a status indicator so I need to know the total number of datasets. I can iterate once and count, but there must be some property somewhere that has the total number of datasets. I'm using C# and the .NET wrappers, but if someone knows where it is in the C library, I can see if its there in the wrapper.

  There's no count of the datasets stored in the file, it must be computed by the application that is interested in it.

  Quincey