This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Copy link from source location to destination location




H5L.copy(src_loc_id,src_name,dest_loc_id,dest_name,lcpl_id,lapl_id) copies the link specified by src_name from the file or group specified by src_loc_id to the destination dest_loc_id. The new copy of the link is created with the name dest_name.

dest_loc_id must refer to either the current file or a group in the current file. If dest_loc_id is the file identifier, the copy is placed in the file's root group.

The new link is created with the creation and access property lists specified by lcpl_id and lapl_id.


plist_id = 'H5P_DEFAULT';
fid = H5F.create('myfile.h5','H5F_ACC_TRUNC',plist_id,plist_id);
g1 = H5G.create(fid,'g1',plist_id);
g2 = H5G.create(fid,'g2',plist_id);
g11 = H5G.create(g1,'g3',plist_id);