[Back to Interface] [Prev] [Next]

SDfileinfo/sffinfo

intn SDfileinfo(int32 sd_id, int32 *num_datasets, int32 *num_global_attrs)

sd_id IN:

SD interface identifier returned by SDstart

num_datasets OUT:

Number of data sets in the file

num_global_attrs OUT:

Number of global attributes in the file

Purpose

Retrieves the number of data sets and the number of global attributes in a file.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

SDfileinfo returns the number of data sets in the parameter num_datasets and the number of global attributes in the parameter num_global_attrs. The term "global attributes" refers to attributes that are assigned to the file. The global attributes are created by SDsetattr using an SD interface identifier (sd_id) rather than a data set identifier (sds_id).

The value returned by the parameter num_datasets includes the number of coordinate variable data sets. To determine if the data set is a coordinate variable, use SDiscoordvar.

FORTRAN

integer function sffinfo(sd_id, num_datasets, num_global_attrs)

integer sd_id, num_datasets, num_global_attrs



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.