Documentation Center

  • Trial Software
  • Product Updates

H5I.get_file_id

File identifier for specified object

Syntax

file_id = H5I.get_file_id(obj_id)

Description

file_id = H5I.get_file_id(obj_id) returns the identifier of the file associated with the object referenced by obj_id.

Examples

fid = H5F.open('example.h5');
gid = H5G.open(fid,'/g4');
fid2 = H5I.get_file_id(gid);
name = H5F.get_name(fid2);
fprintf('The filename is %s.\n',name);
H5G.close(gid);
H5F.close(fid);
H5F.close(fid2);
Was this topic helpful?