List of open HDF5 file objects
[num_obj_ids,obj_id_list] = H5F.get_obj_ids(file_id,types,max_objs)
[num_obj_ids,obj_id_list] = H5F.get_obj_ids(file_id,types,max_objs)
returns a list of all open identifiers for HDF5 objects of the type specified by
types
in the file specified by file_id
. The
max_objs
input specifies the maximum number of object identifiers
to return. num_obj_ids
is the total number of objects in the list.
Specify types
as one of these character vectors or string
scalars:
'H5F_OBJ_FILE' |
'H5F_OBJ_DATASET' |
'H5F_OBJ_GROUP' |
'H5F_OBJ_DATATYPE' |
'H5F_OBJ_ATTR' |
'H5F_OBJ_ALL' |
'H5F_OBJ_LOCAL' |
If the number of objects of the specified type, that are open,
exceeds max_objs
, then num_obj_ids
will
be greater than max_objs
.
fid = H5F.open('example.h5'); gid1 = H5G.open(fid,'/g1'); gid2 = H5G.open(fid,'/g2'); gid3 = H5G.open(fid,'/g3'); gid4 = H5G.open(fid,'/g4'); [num_obj_ids,objs] = H5F.get_obj_ids(fid,'H5F_OBJ_GROUP',3); H5G.close(gid1); H5G.close(gid2); H5G.close(gid3); H5G.close(gid4); H5F.close(fid);