Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

H5O.link

Create hard link to specified object

Syntax

H5O.link(obj_id,new_loc_id,new_link_name,lcpl_id,lapl_id)

Description

H5O.link(obj_id,new_loc_id,new_link_name,lcpl_id,lapl_id) creates a hard link to an object, where new_loc_id and new_link_name specify the location. lcpl_id and lapl_id are the link creation and access property lists associated with the new link.

H5O.link is designed to add additional structure to an existing file so that, for example, an object can be shared among multiple groups.

Examples

Create a hard link from group '/g2' to the dataset '/g1/ds1'.

plist_id = 'H5P_DEFAULT';
fid = H5F.create('myfile.h5','H5F_ACC_TRUNC',plist_id,plist_id);
gid1 = H5G.create(fid,'/g1',plist_id);
space_id = H5S.create_simple(1,10,[]);
ds1 = H5D.create(gid1,'ds1','H5T_NATIVE_INT',space_id,plist_id);
gid2 = H5G.create(fid,'/g2',plist_id);
H5O.link(ds1,gid2,'ds2',plist_id,plist_id);
H5D.close(ds1);
H5S.close(space_id);
H5G.close(gid2); H5G.close(gid1);
H5F.close(fid);
Was this topic helpful?